From a28b5afd155579c4392852c1f07577aacd0d2de7 Mon Sep 17 00:00:00 2001 From: Julien Ponge Date: Thu, 14 Nov 2024 18:14:27 +0100 Subject: [PATCH] Bump to Netty 4.1.115.Final and fix SSL-related substitutions --- bom/application/pom.xml | 2 +- .../runtime/graal/NettySubstitutions.java | 56 +++++++++++-------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index d7e6693da4b34..b1bf159963e41 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -132,7 +132,7 @@ 15.0.10.Final 5.0.12.Final 3.1.8 - 4.1.111.Final + 4.1.115.Final 1.16.0 1.0.4 3.6.1.Final diff --git a/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/NettySubstitutions.java b/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/NettySubstitutions.java index ce7cd265223b3..d32f756d5cb4b 100644 --- a/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/NettySubstitutions.java +++ b/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/NettySubstitutions.java @@ -173,7 +173,8 @@ final class Target_io_netty_handler_ssl_JdkSslServerContext { KeyManagerFactory keyManagerFactory, Iterable ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls, - SecureRandom secureRandom, String keyStore) throws SSLException { + SecureRandom secureRandom, String keyStore, Target_io_netty_handler_ssl_ResumptionController resumptionController) + throws SSLException { } } @@ -181,12 +182,13 @@ final class Target_io_netty_handler_ssl_JdkSslServerContext { final class Target_io_netty_handler_ssl_JdkSslClientContext { @Alias - Target_io_netty_handler_ssl_JdkSslClientContext(Provider sslContextProvider, X509Certificate[] trustCertCollection, - TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, - String keyPassword, KeyManagerFactory keyManagerFactory, Iterable ciphers, - CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols, - long sessionCacheSize, long sessionTimeout, SecureRandom secureRandom, - String keyStoreType) throws SSLException { + Target_io_netty_handler_ssl_JdkSslClientContext(Provider sslContextProvider, + X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, + X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, + KeyManagerFactory keyManagerFactory, Iterable ciphers, CipherSuiteFilter cipherFilter, + ApplicationProtocolConfig apn, String[] protocols, long sessionCacheSize, long sessionTimeout, + SecureRandom secureRandom, String keyStoreType, String endpointIdentificationAlgorithm, + Target_io_netty_handler_ssl_ResumptionController resumptionController) throws SSLException { } } @@ -222,43 +224,51 @@ final class Target_io_netty_handler_ssl_JdkAlpnSslEngine { } } +@TargetClass(className = "io.netty.handler.ssl.ResumptionController") +final class Target_io_netty_handler_ssl_ResumptionController { + // Replacing a package-private class +} + @TargetClass(className = "io.netty.handler.ssl.SslContext") final class Target_io_netty_handler_ssl_SslContext { @Substitute - static SslContext newServerContextInternal(SslProvider provider, Provider sslContextProvider, + static SslContext newServerContextInternal(SslProvider provider, + Provider sslContextProvider, X509Certificate[] trustCertCollection, TrustManagerFactory trustManagerFactory, - X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, - KeyManagerFactory keyManagerFactory, Iterable ciphers, - CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, - long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, - String[] protocols, boolean startTls, boolean enableOcsp, - SecureRandom secureRandom, String keyStoreType, + X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, + Iterable ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, + long sessionCacheSize, long sessionTimeout, ClientAuth clientAuth, String[] protocols, boolean startTls, + boolean enableOcsp, SecureRandom secureRandom, String keyStoreType, Map.Entry, Object>... ctxOptions) throws SSLException { if (enableOcsp) { throw new IllegalArgumentException("OCSP is not supported with this SslProvider: " + provider); } + Target_io_netty_handler_ssl_ResumptionController resumptionController = new Target_io_netty_handler_ssl_ResumptionController(); return (SslContext) (Object) new Target_io_netty_handler_ssl_JdkSslServerContext(sslContextProvider, trustCertCollection, trustManagerFactory, keyCertChain, key, keyPassword, keyManagerFactory, ciphers, cipherFilter, apn, sessionCacheSize, sessionTimeout, - clientAuth, protocols, startTls, secureRandom, keyStoreType); + clientAuth, protocols, startTls, secureRandom, keyStoreType, resumptionController); } @Substitute - static SslContext newClientContextInternal(SslProvider provider, Provider sslContextProvider, - X509Certificate[] trustCert, - TrustManagerFactory trustManagerFactory, X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, - KeyManagerFactory keyManagerFactory, Iterable ciphers, CipherSuiteFilter cipherFilter, - ApplicationProtocolConfig apn, String[] protocols, long sessionCacheSize, long sessionTimeout, - boolean enableOcsp, SecureRandom secureRandom, - String keyStoreType, Map.Entry, Object>... options) throws SSLException { + static SslContext newClientContextInternal(SslProvider provider, + Provider sslContextProvider, + X509Certificate[] trustCert, TrustManagerFactory trustManagerFactory, + X509Certificate[] keyCertChain, PrivateKey key, String keyPassword, KeyManagerFactory keyManagerFactory, + Iterable ciphers, CipherSuiteFilter cipherFilter, ApplicationProtocolConfig apn, String[] protocols, + long sessionCacheSize, long sessionTimeout, boolean enableOcsp, + SecureRandom secureRandom, String keyStoreType, String endpointIdentificationAlgorithm, + Map.Entry, Object>... options) throws SSLException { if (enableOcsp) { throw new IllegalArgumentException("OCSP is not supported with this SslProvider: " + provider); } + Target_io_netty_handler_ssl_ResumptionController resumptionController = new Target_io_netty_handler_ssl_ResumptionController(); return (SslContext) (Object) new Target_io_netty_handler_ssl_JdkSslClientContext(sslContextProvider, trustCert, trustManagerFactory, keyCertChain, key, keyPassword, keyManagerFactory, ciphers, cipherFilter, apn, protocols, sessionCacheSize, - sessionTimeout, secureRandom, keyStoreType); + sessionTimeout, secureRandom, keyStoreType, endpointIdentificationAlgorithm, + resumptionController); } }