I'm developing an application using ICE middleware. I have problem with IceSSL. After configuring both client and server like that:
Ice.Plugin.IceSSL=IceSSL.PluginFactory
IceSSL.DefaultDir=.
IceSSL.Keystore=ssl/s/s.jks
IceSSL.Password=qwerty
IceSSL.Truststore=ssl/s/s.jks
I am getting such an error:
-- 23.05.12 10:57:55:913 ServerApplication: Network: accepting ssl connection
local address = 127.0.0.1:10001
remote address = 127.0.0.1:65415
!! 23.05.12 10:57:56:086 ServerApplication: error: Ice.ThreadPool.Server-0: exception in `Ice.ThreadPool.Server':
java.lang.NullPointerException
at IceInternal.Network.addrToString(Network.java:1044)
at IceSSL.TransceiverI.initialize(TransceiverI.java:60)
at Ice.ConnectionI.initialize(ConnectionI.java:1831)
at Ice.ConnectionI.message(ConnectionI.java:1038)
at IceInternal.ThreadPool.run(ThreadPool.java:302)
at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
at java.lang.Thread.run(Unknown Source)
event handler: local address = 127.0.0.1:10001
remote address = 127.0.0.1:65415
Have anyone know how to fix this?
I had the same problem after wrongly adding certificates to the keystore. If you look at the output of
keytool -list -keystore yourkeystore.jsk
, you'll see the list of certificates. In my case both were listed astrustedCertEntry
(this is afaik how keytool shows certs without a private key).Your cert should probably be listed as
PrivateKeyEntry
, and CA's astrustedCertEntry
.You can try to generate the certificate using keytool only. It worked in my case. Hope it helps.