Bouncy Castle throws NullPointerException after JDK update

Solution Verified - Updated -

Issue

  • We see an exception like the following after updating our JDK:
        java.lang.NullPointerException
                at org.bouncycastle.crypto.signers.PSSSigner.generateSignature(Unknown Source)
                at org.bouncycastle.jcajce.provider.asymmetric.rsa.PSSSignatureSpi.engineSign(Unknown Source)
                at java.security.Signature$Delegate.engineSign(Signature.java:1382)
                at java.security.Signature.sign(Signature.java:698)
                at sun.security.ssl.ECDHServerKeyExchange$ECDHServerKeyExchangeMessage.<init>(ECDHServerKeyExchange.java:181)
                at sun.security.ssl.ECDHServerKeyExchange$ECDHServerKeyExchangeProducer.produce(ECDHServerKeyExchange.java:499)
                at sun.security.ssl.ClientHello$T12ClientHelloConsumer.consume(ClientHello.java:1020)
                at sun.security.ssl.ClientHello$ClientHelloConsumer.onClientHello(ClientHello.java:727)
                at sun.security.ssl.ClientHello$ClientHelloConsumer.consume(ClientHello.java:693)
                at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:377)
                at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:444)
                at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:968)
                at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:955)

Environment

  • OpenJDK
    • 8u261+
    • 11.0.5+10+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content