Fix SSL state transitions.
authorBodo Möller <bodo@openssl.org>
Sun, 14 Sep 2008 14:02:01 +0000 (14:02 +0000)
committerBodo Möller <bodo@openssl.org>
Sun, 14 Sep 2008 14:02:01 +0000 (14:02 +0000)
Submitted by: Nagendra Modadugu

CHANGES
ssl/d1_srvr.c
ssl/s3_srvr.c

diff --git a/CHANGES b/CHANGES
index 7597c6d150e3887792addff292eb5e2ac7dd47d9..cbc7ff99e32bf31cfbc69b3162f229cd701cdebe 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@
 
  Changes between 0.9.8h and 0.9.8i  [xx XXX xxxx]
 
+  *) Fix a state transitition in s3_srvr.c and d1_srvr.c
+     (was using SSL3_ST_CW_CLNT_HELLO_B, should be ..._ST_SW_SRVR_...).
+     [Nagendra Modadugu]
+
   *) The fix in 0.9.8c that supposedly got rid of unsafe
      double-checked locking was incomplete for RSA blinding,
      addressing just one layer of what turns out to have been
index 927b01f3c477739fdab61cacea72b3f8ebb090c2..0bbf8ae7f311b6f25ada781bad2d339973da9b0a 100644 (file)
@@ -732,7 +732,7 @@ int dtls1_send_server_hello(SSL *s)
 
                d = dtls1_set_message_header(s, d, SSL3_MT_SERVER_HELLO, l, 0, l);
 
-               s->state=SSL3_ST_CW_CLNT_HELLO_B;
+               s->state=SSL3_ST_SW_SRVR_HELLO_B;
                /* number of bytes to write */
                s->init_num=p-buf;
                s->init_off=0;
@@ -741,7 +741,7 @@ int dtls1_send_server_hello(SSL *s)
                dtls1_buffer_message(s, 0);
                }
 
-       /* SSL3_ST_CW_CLNT_HELLO_B */
+       /* SSL3_ST_SW_SRVR_HELLO_B */
        return(dtls1_do_write(s,SSL3_RT_HANDSHAKE));
        }
 
@@ -765,7 +765,7 @@ int dtls1_send_server_done(SSL *s)
                dtls1_buffer_message(s, 0);
                }
 
-       /* SSL3_ST_CW_CLNT_HELLO_B */
+       /* SSL3_ST_SW_SRVR_DONE_B */
        return(dtls1_do_write(s,SSL3_RT_HANDSHAKE));
        }
 
index d5d3c4ad5883fcd3708a3f3ef4a5e196550c7ad6..274493e00277afda581ec0e279498b637ac96816 100644 (file)
@@ -1172,13 +1172,13 @@ int ssl3_send_server_hello(SSL *s)
                *(d++)=SSL3_MT_SERVER_HELLO;
                l2n3(l,d);
 
-               s->state=SSL3_ST_CW_CLNT_HELLO_B;
+               s->state=SSL3_ST_SW_CLNT_HELLO_B;
                /* number of bytes to write */
                s->init_num=p-buf;
                s->init_off=0;
                }
 
-       /* SSL3_ST_CW_CLNT_HELLO_B */
+       /* SSL3_ST_SW_CLNT_HELLO_B */
        return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
        }
 
@@ -1202,7 +1202,7 @@ int ssl3_send_server_done(SSL *s)
                s->init_off=0;
                }
 
-       /* SSL3_ST_CW_CLNT_HELLO_B */
+       /* SSL3_ST_SW_SRVR_DONE_B */
        return(ssl3_do_write(s,SSL3_RT_HANDSHAKE));
        }