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/15 18:43:49 UTC
svn commit: r997394 -
/harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/native/jsse/shared/sslSession.c
Author: odeakin
Date: Wed Sep 15 16:43:49 2010
New Revision: 997394
URL: http://svn.apache.org/viewvc?rev=997394&view=rev
Log:
Commit natives that go with the previous SSLEngine change.
Modified:
harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/native/jsse/shared/sslSession.c
Modified: harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/native/jsse/shared/sslSession.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/native/jsse/shared/sslSession.c?rev=997394&r1=997393&r2=997394&view=diff
==============================================================================
--- harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/native/jsse/shared/sslSession.c (original)
+++ harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/native/jsse/shared/sslSession.c Wed Sep 15 16:43:49 2010
@@ -49,7 +49,7 @@ JNIEXPORT jstring JNICALL Java_org_apach
char *protocol = SSL_get_cipher_version(ssl);
char *specName = NULL;
char *finalName;
-
+
if (!strcmp(protocol, "TLSv1/SSLv3")) {
// We're in either TLS or SSLv3, now find the spec name
specName = getSpecName(cipherName, getTLSv1OpenSSLNames(), getTLSv1SpecNames(), TLSv1_CIPHER_COUNT);
@@ -61,10 +61,13 @@ JNIEXPORT jstring JNICALL Java_org_apach
specName = getSpecName(cipherName, getSSLv3OpenSSLNames(), getSSLv3SpecNames(), SSLv3_CIPHER_COUNT);
protocol = "SSLv3";
}
+ } else if (!strcmp(protocol, "(NONE)")) {
+ // Handshake not completed yet - return NULL protocol/cipher
+ return (*env)->NewStringUTF(env, "NONE:SSL_NULL_WITH_NULL_NULL");
} else {
// SSLv2 case - protocol will already be "SSLv2", so no need to set it
specName = getSpecName(cipherName, getSSLv2OpenSSLNames(), getSSLv2SpecNames(), SSLv2_CIPHER_COUNT);
- }
+ }
// finalName is "protocol:specName\0"
// protocol length is always 5, so allocate strlen(specName) + 5 + 1 for the colon + 1 for the terminator