@@ -82,6 +82,7 @@ private GrpcSslContexts() {}
8282 NEXT_PROTOCOL_VERSIONS );
8383
8484 private static final String SUN_PROVIDER_NAME = "SunJSSE" ;
85+ private static final String IBM_PROVIDER_NAME = "IBMJSSE2" ;
8586
8687 /**
8788 * Creates an SslContextBuilder with ciphers and APN appropriate for gRPC.
@@ -186,7 +187,7 @@ public static SslContextBuilder configure(SslContextBuilder builder, SslProvider
186187 @ CanIgnoreReturnValue
187188 public static SslContextBuilder configure (SslContextBuilder builder , Provider jdkProvider ) {
188189 ApplicationProtocolConfig apc ;
189- if (SUN_PROVIDER_NAME .equals (jdkProvider .getName ())) {
190+ if (SUN_PROVIDER_NAME .equals (jdkProvider .getName ()) || IBM_PROVIDER_NAME . equals ( jdkProvider . getName ()) ) {
190191 // Jetty ALPN/NPN only supports one of NPN or ALPN
191192 if (JettyTlsUtil .isJettyAlpnConfigured ()) {
192193 apc = ALPN ;
@@ -196,7 +197,7 @@ public static SslContextBuilder configure(SslContextBuilder builder, Provider jd
196197 apc = ALPN ;
197198 } else {
198199 throw new IllegalArgumentException (
199- SUN_PROVIDER_NAME + " selected, but Java 9+ and Jetty NPN/ALPN unavailable" );
200+ jdkProvider . getName () + " selected, but Java 9+ and Jetty NPN/ALPN unavailable" );
200201 }
201202 } else if (ConscryptLoader .isConscrypt (jdkProvider )) {
202203 apc = ALPN ;
@@ -237,7 +238,7 @@ private static SslProvider defaultSslProvider() {
237238
238239 private static Provider findJdkProvider () {
239240 for (Provider provider : Security .getProviders ("SSLContext.TLS" )) {
240- if (SUN_PROVIDER_NAME .equals (provider .getName ())) {
241+ if (SUN_PROVIDER_NAME .equals (provider .getName ()) || IBM_PROVIDER_NAME . equals ( provider . getName ()) ) {
241242 if (JettyTlsUtil .isJettyAlpnConfigured ()
242243 || JettyTlsUtil .isJettyNpnConfigured ()
243244 || JettyTlsUtil .isJava9AlpnAvailable ()) {
0 commit comments