harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r993059 - in /harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse: ConnectionStateSSLv3.java ConnectionStateTLS.java HandshakeProtocol.java
Date Mon, 06 Sep 2010 15:01:45 GMT
Author: odeakin
Date: Mon Sep  6 15:01:45 2010
New Revision: 993059

URL: http://svn.apache.org/viewvc?rev=993059&view=rev
Log:
Comment out some lines using fields in SSLSessionImpl that no longer exist. These classes
will be removed completely at a later stage.

Modified:
    harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
    harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
    harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java

Modified: harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.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/ConnectionStateSSLv3.java?rev=993059&r1=993058&r2=993059&view=diff
==============================================================================
--- harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
(original)
+++ harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
Mon Sep  6 15:01:45 2010
@@ -59,7 +59,7 @@ public class ConnectionStateSSLv3 extend
      */
     protected ConnectionStateSSLv3(SSLSessionImpl session) {
         try {
-            CipherSuite cipherSuite = session.cipherSuite;
+            CipherSuite cipherSuite = null; //session.cipherSuite;
 
             boolean is_exportabe =  cipherSuite.isExportable();
             hash_size = cipherSuite.getMACLength();
@@ -82,8 +82,8 @@ public class ConnectionStateSSLv3 extend
                 logger.println("  key size: " + key_size);
             }
 
-            byte[] clientRandom = session.clientRandom;
-            byte[] serverRandom = session.serverRandom;
+            byte[] clientRandom = null; //session.clientRandom;
+            byte[] serverRandom = null; //session.serverRandom;
             // so we need PRF value of size of
             // 2*hash_size + 2*key_size + 2*iv_size
             byte[] key_block = new byte[2*hash_size + 2*key_size + 2*iv_size];
@@ -92,7 +92,8 @@ public class ConnectionStateSSLv3 extend
             System.arraycopy(clientRandom, 0, seed, serverRandom.length,
                     clientRandom.length);
 
-            PRF.computePRF_SSLv3(key_block, session.master_secret, seed);
+            PRF.computePRF_SSLv3(key_block, null, //session.master_secret, 
+                                                  seed);
 
             byte[] client_mac_secret = new byte[hash_size];
             byte[] server_mac_secret = new byte[hash_size];
@@ -149,7 +150,7 @@ public class ConnectionStateSSLv3 extend
             if (logger != null) {
                 logger.println("is exportable: "+is_exportabe);
                 logger.println("master_secret");
-                logger.print(session.master_secret);
+                //logger.print(session.master_secret);
                 logger.println("client_random");
                 logger.print(clientRandom);
                 logger.println("server_random");

Modified: harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.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/ConnectionStateTLS.java?rev=993059&r1=993058&r2=993059&view=diff
==============================================================================
--- harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
(original)
+++ harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
Mon Sep  6 15:01:45 2010
@@ -86,7 +86,7 @@ public class ConnectionStateTLS extends 
      */
     protected ConnectionStateTLS(SSLSessionImpl session) {
         try {
-            CipherSuite cipherSuite = session.cipherSuite;
+            CipherSuite cipherSuite = null; //session.cipherSuite;
 
             hash_size = cipherSuite.getMACLength();
             boolean is_exportabe =  cipherSuite.isExportable();
@@ -109,8 +109,8 @@ public class ConnectionStateTLS extends 
                 logger.println("  key size: " + key_size);
             }
 
-            byte[] clientRandom = session.clientRandom;
-            byte[] serverRandom = session.serverRandom;
+            byte[] clientRandom = null; //session.clientRandom;
+            byte[] serverRandom = null; //session.serverRandom;
             // so we need PRF value of size of
             // 2*hash_size + 2*key_size + 2*iv_size
             byte[] key_block = new byte[2*hash_size + 2*key_size + 2*iv_size];
@@ -119,7 +119,7 @@ public class ConnectionStateTLS extends 
             System.arraycopy(clientRandom, 0, seed, serverRandom.length,
                     clientRandom.length);
 
-            PRF.computePRF(key_block, session.master_secret,
+            PRF.computePRF(key_block, null, //session.master_secret,
                     KEY_EXPANSION_LABEL, seed);
 
             byte[] client_mac_secret = new byte[hash_size];
@@ -174,7 +174,7 @@ public class ConnectionStateTLS extends 
             if (logger != null) {
                 logger.println("is exportable: "+is_exportabe);
                 logger.println("master_secret");
-                logger.print(session.master_secret);
+                //logger.print(session.master_secret);
                 logger.println("client_random");
                 logger.print(clientRandom);
                 logger.println("server_random");

Modified: harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.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/HandshakeProtocol.java?rev=993059&r1=993058&r2=993059&view=diff
==============================================================================
--- harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
(original)
+++ harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
Mon Sep  6 15:01:45 2010
@@ -353,7 +353,7 @@ public abstract class HandshakeProtocol 
         System.arraycopy(sha_digest, 0, digest, md5_digest.length,
                 sha_digest.length);
         try {
-            PRF.computePRF(buf, session.master_secret, 
+            PRF.computePRF(buf, null, //session.master_secret, 
                     label.getBytes(), digest);
         } catch (GeneralSecurityException e) {
             fatalAlert(AlertProtocol.INTERNAL_ERROR, "PRF error", e);
@@ -390,17 +390,17 @@ public abstract class HandshakeProtocol 
             byte[] hanshake_messages = io_stream.getMessages();
             md5.update(hanshake_messages);
             md5.update(sender);
-            md5.update(session.master_secret);
+            //md5.update(session.master_secret);
             byte[] b = md5.digest(SSLv3Constants.MD5pad1);
-            md5.update(session.master_secret);
+            //md5.update(session.master_secret);
             md5.update(SSLv3Constants.MD5pad2);
             System.arraycopy(md5.digest(b), 0, buf, 0, 16);
 
             sha.update(hanshake_messages);
             sha.update(sender);
-            sha.update(session.master_secret);
+            //sha.update(session.master_secret);
             b = sha.digest(SSLv3Constants.SHApad1);
-            sha.update(session.master_secret);
+            //sha.update(session.master_secret);
             sha.update(SSLv3Constants.SHApad2);
             System.arraycopy(sha.digest(b), 0, buf, 16, 20);
         } catch (Exception e) {
@@ -448,16 +448,17 @@ public abstract class HandshakeProtocol 
         byte[] seed = new byte[64];
         System.arraycopy(clientHello.getRandom(), 0, seed, 0, 32);
         System.arraycopy(serverHello.getRandom(), 0, seed, 32, 32);
-        session.master_secret = new byte[48];
+        //session.master_secret = new byte[48];
         if (serverHello.server_version[1] == 1) { // TLSv1
             try {
-                PRF.computePRF(session.master_secret, preMasterSecret,
-                        master_secret_bytes, seed);
+                PRF.computePRF(null, //session.master_secret, 
+                                     preMasterSecret, master_secret_bytes, seed);
             } catch (GeneralSecurityException e) {
                 fatalAlert(AlertProtocol.INTERNAL_ERROR, "PRF error", e);
             }
         } else { // SSL3.0
-            PRF.computePRF_SSLv3(session.master_secret, preMasterSecret, seed);
+            PRF.computePRF_SSLv3(//session.master_secret
+                                 null, preMasterSecret, seed);
         }
         
         //delete preMasterSecret from memory



Mime
View raw message