From e65bcbcef05007ad00e26c8132a8d5f4baa981f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Sun, 14 Sep 2008 14:02:07 +0000 Subject: [PATCH] Fix SSL state transitions. Submitted by: Nagendra Modadugu --- CHANGES | 4 ++++ ssl/d1_srvr.c | 6 +++--- ssl/s3_srvr.c | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 41e23dc9ca..387a580312 100644 --- a/CHANGES +++ b/CHANGES @@ -705,6 +705,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 diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index c6f98a832b..1ded18df50 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -725,7 +725,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; @@ -734,7 +734,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)); } @@ -758,7 +758,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)); } diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 4ffc2fcf39..bd410c8116 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1208,13 +1208,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)); } @@ -1238,7 +1238,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)); } -- GitLab