Fix wrong handling of session ID in SSLv2 client code.
authorLutz Jänicke <jaenicke@openssl.org>
Sun, 29 Dec 2002 20:58:55 +0000 (20:58 +0000)
committerLutz Jänicke <jaenicke@openssl.org>
Sun, 29 Dec 2002 20:58:55 +0000 (20:58 +0000)
PR: 377

CHANGES
ssl/s2_clnt.c

diff --git a/CHANGES b/CHANGES
index afefb21303496f4bab186425d171b37049929c17..a259bd33af78f932bfee167983ed4421d2b6e4a4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,15 @@
 
  Changes between 0.9.6h and 0.9.7  [XX xxx 2002]
 
+  *) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
+     code (06) was taken as the first octet of the session ID and the last
+     octet was ignored consequently. As a result SSLv2 client side session
+     caching could not have worked due to the session ID mismatch between
+     client and server.
+     Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
+     PR #377.
+     [Lutz Jaenicke]
+
   *) Change the declaration of needed Kerberos libraries to use EX_LIBS
      instead of the special (and badly supported) LIBKRB5.  LIBKRB5 is
      removed entirely.
index 0bc04d284e83060164cc2a429ca23d686761c20b..c6319bb63da68cb4fa282f93eca2c5db274508b6 100644 (file)
@@ -1014,7 +1014,7 @@ static int get_server_finished(SSL *s)
                 * or bad things can happen */
                /* ZZZZZZZZZZZZZ */
                s->session->session_id_length=SSL2_SSL_SESSION_ID_LENGTH;
-               memcpy(s->session->session_id,p,SSL2_SSL_SESSION_ID_LENGTH);
+               memcpy(s->session->session_id,p+1,SSL2_SSL_SESSION_ID_LENGTH);
                }
        else
                {