aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

[CONNECTOR-698] Fix SSL context creation in proxy fails when OpenSSL is the SSL provider. #267

Closed tejassp closed 1 year ago

tejassp commented 1 year ago

When OpenSSL is available GrpcSslContext builder sets the supported protocols to NPN_AND_ALPN. When a com.aerospike.client.policy.TlsPolicy is passed in with a SSLContext, in proxy client code io.netty.handler.ssl.JdkSslContext is created with the passed in SSLContext being used as the delegate, but io.netty.handler.ssl.JdkSslContext fails with an exception when the supported protocols is NPN_AND_ALPN.

Solution is to create an application protocol config with only ALPN support when NPN_AND_ALPN support is detected.