Really fix SSLv2 session ID handling
authorLutz Jänicke <jaenicke@openssl.org>
Wed, 15 Jan 2003 09:48:29 +0000 (09:48 +0000)
committerLutz Jänicke <jaenicke@openssl.org>
Wed, 15 Jan 2003 09:48:29 +0000 (09:48 +0000)
PR: 377

CHANGES
ssl/s2_clnt.c

diff --git a/CHANGES b/CHANGES
index 2f4554b03f9503a2ab61c3ffb31c987efc8ad174..85bd963ae91c6b72e818d481265c1230a17e756c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,15 @@
 
  Changes between 0.9.7 and 0.9.7a  [XX xxx 2003]
 
+  *) Another fix for SSLv2 session ID handling: the session ID was incorrectly
+     checked on reconnect on the client side, therefore session resumption
+     could still fail with a "ssl session id is different" error. This
+     behaviour is masked when SSL_OP_ALL is used due to
+     SSL_OP_MICROSOFT_SESS_ID_BUG being set.
+     Behaviour observed by Crispin Flowerday <crispin@flowerday.cx> as
+     followup to PR #377.
+     [Lutz Jaenicke]
+
   *) IA-32 assembler support enhancements: unified ELF targets, support
      for SCO/Caldera platforms, fix for Cygwin shared build.
      [Andy Polyakov]
index c6319bb63da68cb4fa282f93eca2c5db274508b6..1d24dedc918b261552f0b9376079dbd124fa2c43 100644 (file)
@@ -1021,7 +1021,7 @@ static int get_server_finished(SSL *s)
                if (!(s->options & SSL_OP_MICROSOFT_SESS_ID_BUG))
                        {
                        if ((s->session->session_id_length > sizeof s->session->session_id)
-                           || (0 != memcmp(buf, s->session->session_id,
+                           || (0 != memcmp(buf + 1, s->session->session_id,
                                            (unsigned int)s->session->session_id_length)))
                                {
                                ssl2_return_error(s,SSL2_PE_UNDEFINED_ERROR);