You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by od...@apache.org on 2010/09/03 17:28:39 UTC
svn commit: r992326 -
/harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java
Author: odeakin
Date: Fri Sep 3 15:28:38 2010
New Revision: 992326
URL: http://svn.apache.org/viewvc?rev=992326&view=rev
Log:
Add the new SSLSession to the appropriate SSLSessionContext. Also minor change to reference SSLParameters.threadLocalParams statically.
Modified:
harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java
Modified: harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java?rev=992326&r1=992325&r2=992326&view=diff
==============================================================================
--- harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java (original)
+++ harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java Fri Sep 3 15:28:38 2010
@@ -471,7 +471,7 @@ public class SSLSocketImpl extends SSLSo
}
// Set the thread local SSLParameter so it can be used in the RNG callbacks
- sslParameters.threadLocalParams.set(sslParameters);
+ SSLParameters.threadLocalParams.set(sslParameters);
if (!handshake_started) {
handshake_started = true;
@@ -481,6 +481,7 @@ public class SSLSocketImpl extends SSLSo
fd = (FileDescriptor) fdField.get(impl);
descriptor = descriptorField.getLong(fd);
} catch (IllegalAccessException e) {
+ SSLParameters.threadLocalParams.remove();
throw new Error(e);
}
@@ -503,6 +504,8 @@ public class SSLSocketImpl extends SSLSo
}
session = new SSLSessionImpl(this, sslParameters, SSL);
+ sslParameters.getClientSessionContext().putSession(session);
+
// Notify handshake completion listeners
if (listeners != null) {
HandshakeCompletedEvent event =
@@ -519,7 +522,7 @@ public class SSLSocketImpl extends SSLSo
}
// Remove our thread local SSLParameter now we are complete
- sslParameters.threadLocalParams.remove();
+ SSLParameters.threadLocalParams.remove();
}
// ---------------- Socket's methods overridings -------------------