R
Rick Genter
I am using JSSE to create SSL sockets. My application just experienced
a freeze on the following fragment of code:
if (debugLevel >= 4)
logMessageln(logHeader() + "_createSSLContext: building
SSLContext");
SSLContext sslContext =
SSLContext.getInstance(gP().getKeyStoreProtocol());
sslContext.init(keyManagers, trustManagers, null);
if (debugLevel >= 4)
logMessageln(logHeader() + "_createSSLContext: SSLContext built");
gP() simply returns a global properties object, and the
getKeyStoreProtocol() method of that object simply returns a String
with the protocol to use (which is "JKS" in this instance).
keyManagers and trustManagers are KeyManager[] and TrustManager[]
arrays returned by KeyManagerFactory.getKeyManagers() and
TrustManagerFactory.getTrustManagers() respectively.
I saw the first message (building SSLContext), but not the second
(SSLContext built). The system sat quiescent for over half an hour
before I realized that it had hung (the timestamp on the first message
was at 12:00, and I noticed that it had hung at 12:32).
Does anyone have any suggestions on how I can track down why this
would hang? Note that this code is in a loop that creates an
SSLContext every 30 seconds or so and had been running fine for two
days before encountering this freeze.
Thanks in advance.
Rick
a freeze on the following fragment of code:
if (debugLevel >= 4)
logMessageln(logHeader() + "_createSSLContext: building
SSLContext");
SSLContext sslContext =
SSLContext.getInstance(gP().getKeyStoreProtocol());
sslContext.init(keyManagers, trustManagers, null);
if (debugLevel >= 4)
logMessageln(logHeader() + "_createSSLContext: SSLContext built");
gP() simply returns a global properties object, and the
getKeyStoreProtocol() method of that object simply returns a String
with the protocol to use (which is "JKS" in this instance).
keyManagers and trustManagers are KeyManager[] and TrustManager[]
arrays returned by KeyManagerFactory.getKeyManagers() and
TrustManagerFactory.getTrustManagers() respectively.
I saw the first message (building SSLContext), but not the second
(SSLContext built). The system sat quiescent for over half an hour
before I realized that it had hung (the timestamp on the first message
was at 12:00, and I noticed that it had hung at 12:32).
Does anyone have any suggestions on how I can track down why this
would hang? Note that this code is in a loop that creates an
SSLContext every 30 seconds or so and had been running fine for two
days before encountering this freeze.
Thanks in advance.
Rick