Index: SSLClientKeyExchange.java
===================================================================
RCS file: /usr/local/CVS/ptls/SSLClientKeyExchange.java,v
retrieving revision 1.7
diff -c -r1.7 SSLClientKeyExchange.java
*** SSLClientKeyExchange.java	2000/05/09 15:35:16	1.7
--- SSLClientKeyExchange.java	2000/10/20 18:36:43
***************
*** 69,75 ****
  	     conn.hs.pre_master_secret=new byte[48];
  	     conn.hs.rng.nextBytes(conn.hs.pre_master_secret);
  	     conn.hs.pre_master_secret[0]=3;
! 	     conn.hs.pre_master_secret[1]=(byte)(conn.ssl_version & 0xff);
  	     
  	     Cipher ciph=Cipher.getInstance("RSA");
  	     if(conn.hs.peerEncryptionKey==null)
--- 69,75 ----
  	     conn.hs.pre_master_secret=new byte[48];
  	     conn.hs.rng.nextBytes(conn.hs.pre_master_secret);
  	     conn.hs.pre_master_secret[0]=3;
! 	     conn.hs.pre_master_secret[1]=(byte)(conn.max_ssl_version & 0xff);
  	     
  	     Cipher ciph=Cipher.getInstance("RSA");
  	     if(conn.hs.peerEncryptionKey==null)
Index: SSLConn.java
===================================================================
RCS file: /usr/local/CVS/ptls/SSLConn.java,v
retrieving revision 1.6
diff -c -r1.6 SSLConn.java
*** SSLConn.java	1999/06/22 06:24:53	1.6
--- SSLConn.java	2000/10/20 18:35:23
***************
*** 56,62 ****
       static int debugVal=0;
       
       /* Connection Housekeeping*/
!      int ssl_version=0;	// SSLv3
       SSLContext ctx;
       Socket s;
       SSLPolicyInt policy;	// The policy we're following
--- 56,64 ----
       static int debugVal=0;
       
       /* Connection Housekeeping*/
!      int ssl_version=0;
!      int max_ssl_version=0;
!      
       SSLContext ctx;
       Socket s;
       SSLPolicyInt policy;	// The policy we're following
***************
*** 105,110 ****
--- 107,113 ----
       
       void handshake()
         throws IOException {
+        max_ssl_version=policy.negotiateTLSP()?SSLHandshake.TLS_V1_VERSION:SSLHandshake.SSL_V3_VERSION;
         ssl_version=policy.negotiateTLSP()?SSLHandshake.TLS_V1_VERSION:SSLHandshake.SSL_V3_VERSION;
         
         if(how == SSL_CLIENT){
