0

我正在使用 ICE 中间件开发应用程序。我对 IceSSL 有疑问。像这样配置客户端和服务器后:

Ice.Plugin.IceSSL=IceSSL.PluginFactory
IceSSL.DefaultDir=.
IceSSL.Keystore=ssl/s/s.jks
IceSSL.Password=qwerty
IceSSL.Truststore=ssl/s/s.jks

我收到这样的错误:

 -- 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

有谁知道如何解决这个问题?

4

1 回答 1

0

错误地将证书添加到密钥库后,我遇到了同样的问题。如果您查看 的输出keytool -list -keystore yourkeystore.jsk,您将看到证书列表。在我的情况下,两者都被列为trustedCertEntry(这是 afaik keytool 如何在没有私钥的情况下显示证书)。

Enter keystore password:  

(...)
Your keystore contains 2 entries

cacert, May 23, 2012, trustedCertEntry, 
Certificate fingerprint (SHA1): 47:...:5C
rsakey, May 23, 2012, trustedCertEntry, 
Certificate fingerprint (SHA1): D2:...:61

您的证书可能应该列为PrivateKeyEntry,而 CA 的列为trustedCertEntry.

您可以尝试仅使用 keytool 生成证书。它在我的情况下有效。希望能帮助到你。

于 2012-05-23T19:52:28.877 回答