Uploaded image for project: 'WildFly OpenSSL'
  1. WildFly OpenSSL
  2. WFSSL-7

NPE on obtaining PrivateKey from FIPS PKCS11 key manager should be handled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • 1.0.2.Final
    • None

      When in FIPS mode, PrivateKey.getEncoded() returns null, which causes following NPE which should be handled:

      [Host Controller] Caused by: java.lang.RuntimeException: java.lang.NullPointerException
      [Host Controller] 	at org.wildfly.openssl.OpenSSLContextSPI.init(OpenSSLContextSPI.java:249)
      [Host Controller] 	at org.wildfly.openssl.OpenSSLContextSPI.engineInit(OpenSSLContextSPI.java:319)
      [Host Controller] 	at javax.net.ssl.SSLContext.init(SSLContext.java:282)
      [Host Controller] 	at org.wildfly.security.ssl.SSLContextBuilder.lambda$build$0(SSLContextBuilder.java:345)
      [Host Controller] 	at org.wildfly.security.OneTimeSecurityFactory.create(OneTimeSecurityFactory.java:45)
      [Host Controller] 	at org.wildfly.extension.elytron.SSLDefinitions$4.lambda$getValueSupplier$1(SSLDefinitions.java:730)
      [Host Controller] 	at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
      [Host Controller] 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
      [Host Controller] 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
      [Host Controller] 	... 3 more
      [Host Controller] Caused by: java.lang.NullPointerException
      [Host Controller] 	at java.util.Base64$Encoder.encode(Base64.java:261)
      [Host Controller] 	at java.util.Base64$Encoder.encodeToString(Base64.java:315)
      [Host Controller] 	at org.wildfly.openssl.OpenSSLContextSPI.init(OpenSSLContextSPI.java:199)
      [Host Controller] 	... 11 more
      

              jkalina@redhat.com Jan Kalina (Inactive)
              jkalina@redhat.com Jan Kalina (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: