tiger154 / jwebsocket

Automatically exported from code.google.com/p/jwebsocket
1 stars 0 forks source link

SunX509 KeyManagerFactory not available on an IBM i (aka iSeries or AS/400) #186

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I start my server I see this error reported in the log:
"SunX509 KeyManagerFactory not available"

This is because I am running on an IBM i (aka iSeries or AS400) where the 
algorithm specified in the JRE java.security file says:
-------------------------------------------------------
#  
# Determines the default key and trust manager factory algorithms for   
# the javax.net.ssl package.  
#  
ssl.KeyManagerFactory.algorithm=IbmX509  
ssl.TrustManagerFactory.algorithm=PKIX  
-------------------------------------------------------

The problem appears to exist in both the TCPEngine class and the nio.Util 
class. They both do this:

"KeyManagerFactory lKMF = KeyManagerFactory.getInstance("SunX509");"

whereas I believe it should be something like this

"KeyManagerFactory lKMF = 
KeyManagerFactory.getInstance(Security.getProperty("ssl.KeyManagerFactory.algori
thm")); "

Original issue reported on code.google.com by kevin.p....@googlemail.com on 21 Jul 2012 at 2:15