'SSLException: caused java.lang.NullPointerException at java.base/sun.security.ssl.SignatureScheme.values(SignatureScheme.java:49)

Getting a weird SSL exception caused by java.lang.NullPointerException at sun.security.ssl.SignatureScheme.values

javax.ws.rs.ProcessingException: javax.net.ssl.SSLException at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:268) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:297) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:662) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:697) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:691) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~[jersey-common-2.34.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~[jersey-common-2.34.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:205) ~[jersey-common-2.34.jar:?] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390) ~[jersey-common-2.34.jar:?] at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:691) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:661) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:439) ~[jersey-client-2.34.jar:?] at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:345) ~[jersey-client-2.34.jar:?] at com.fortanix.sdkms.v1.ApiClient.invokeAPI(ApiClient.java:769) ~[sdkms-client-4.4.devel.jar:?] at com.fortanix.sdkms.v1.api.AuthenticationApi.authorize(AuthenticationApi.java:74) ~[sdkms-client-4.4.devel.jar:?]

Caused by: java.lang.NullPointerException
    at sun.security.ssl.SignatureScheme.values(SignatureScheme.java:49) ~[?:?]
    at sun.security.ssl.SignatureScheme.getSupportedAlgorithms(SignatureScheme.java:365) ~[?:?]
    at sun.security.ssl.SignatureAlgorithmsExtension$CHSignatureSchemesProducer.produce(SignatureAlgorithmsExtension.java:187) ~[?:?]
    at sun.security.ssl.SSLExtension.produce(SSLExtension.java:583) ~[?:?]
    at sun.security.ssl.SSLExtensions.produce(SSLExtensions.java:253) ~[?:?]
    at sun.security.ssl.ClientHello$ClientHelloKickstartProducer.produce(ClientHello.java:650) ~[?:?]
    at sun.security.ssl.SSLHandshake.kickstart(SSLHandshake.java:525) ~[?:?]
    at sun.security.ssl.ClientHandshakeContext.kickstart(ClientHandshakeContext.java:107) ~[?:?]
    at sun.security.ssl.TransportContext.kickstart(TransportContext.java:249) ~[?:?]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:394) ~[?:?]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:373) ~[?:?]
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567) ~[?:?]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:197) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520) ~[?:?]
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527) ~[?:?]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:334) ~[?:?]
javax.net.ssl|WARNING|01|main|2022-03-03 18:06:14.365 IST|SignatureScheme.java:295|Signature algorithm, ed25519, is not supported by the underlying providers
    at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:377) ~[jersey-client-2.34.jar:?]
    at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:266) ~[jersey-client-2.34.jar:?]
    ... 99 more
javax.net.ssl|DEBUG|01|main|2022-03-03 18:06:14.387 IST|X509TrustManagerImpl.java:79|adding as trusted certificates (
  "certificate" : {
    "version"            : "v3",
    "serial number"      : "03 53 4E AE 8F 01 B6 F9 00 BA 77 4D 3E 55 4A 86 D6 F8",
    "signature algorithm": "SHA256withRSA",
    "issuer"             : "CN=R3, O=Let's Encrypt, C=US",
    "not before"         : "2022-01-04 02:42:28.000 IST",
    "not  after"         : "2022-04-04 02:42:27.000 IST",
    "subject"            : "CN=sdkms.test.fortanix.com",
    "subject public key" : "RSA",
    "extensions"         : [
      {
        ObjectId: 1.3.6.1.4.1.11129.2.4.2 Criticality=false
      },
      {
        ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
        AuthorityInfoAccess [
          [
           accessMethod: ocsp
           accessLocation: URIName: http://r3.o.lencr.org
        , 
           accessMethod: caIssuers
           accessLocation: URIName: http://r3.i.lencr.org/
        ]
        ]
      },
      {
        ObjectId: 2.5.29.35 Criticality=false
        AuthorityKeyIdentifier [
        KeyIdentifier [
        0000: 14 2E B3 17 B7 58 56 CB   AE 50 09 40 E6 1F AF 9D  .....XV..P.@....
        0010: 8B 14 C2 C6                                        ....
        ]
        ]
      },
      {
        ObjectId: 2.5.29.19 Criticality=true
        BasicConstraints:[
          CA:false
          PathLen: undefined
        ]
      },
      {
        ObjectId: 2.5.29.32 Criticality=false
        CertificatePolicies [
          [CertificatePolicyId: [2.23.140.1.2.1]
        []  ]
          [CertificatePolicyId: [1.3.6.1.4.1.44947.1.1.1]
        [PolicyQualifierInfo: [
          qualifierID: 1.3.6.1.5.5.7.2.1
          qualifier: 0000: 16 1A 68 74 74 70 3A 2F   2F 63 70 73 2E 6C 65 74  ..http://cps.let
        0010: 73 65 6E 63 72 79 70 74   2E 6F 72 67              sencrypt.org
        
        ]]  ]
        ]
      },
      {
        ObjectId: 2.5.29.37 Criticality=false
        ExtendedKeyUsages [
          serverAuth
          clientAuth
        ]
      },
      {
        ObjectId: 2.5.29.15 Criticality=true
        KeyUsage [
          DigitalSignature
          Key_Encipherment
        ]
      },
      {
        ObjectId: 2.5.29.17 Criticality=false
        SubjectAlternativeName [
          DNSName: apps.sdkms.test.fortanix.com
          DNSName: sdkms.test.fortanix.com
        ]
      },
      {
        ObjectId: 2.5.29.14 Criticality=false
        SubjectKeyIdentifier [
        KeyIdentifier [
        0000: 89 CE 5C EE 0F 20 2D 46   24 A7 0F ED 62 ED 2F F6  ..\.. -F$...b./.
        0010: 7F D4 6F 39                                        ..o9
        ]
        ]
      }
    ]}
)
javax.net.ssl|DEBUG|01|main|2022-03-03 18:06:14.718 IST|Utilities.java:73|the previous server name in SNI (type=host_name (0), value=sdkms.test.fortanix.com) was replaced with (type=host_name (0), value=sdkms.test.fortanix.com)
javax.net.ssl|WARNING|01|main|2022-03-03 18:06:14.739 IST|SSLSocketImpl.java:1505|handling exception (
"throwable" : {
  java.lang.NullPointerException

Have tried running with both OpenJDK 8 and 11, but getting the same error. Any sort of help would be highly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source