summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-07-20 17:17:51 +0200
committerDr. Stephen Henson <steve@openssl.org>2011-07-20 17:17:51 +0200
commit0445ab3ae03d94ccb48eb9b1c22a11a296e3b5c3 (patch)
tree523b9ad2a783f26652325fda246db072862b65a9 /ssl
parentPR: 2550 (diff)
downloadopenssl-0445ab3ae03d94ccb48eb9b1c22a11a296e3b5c3.tar.xz
openssl-0445ab3ae03d94ccb48eb9b1c22a11a296e3b5c3.zip
PR: 2555
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Fix DTLS sequence number bug
Diffstat (limited to 'ssl')
-rw-r--r--ssl/d1_srvr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c
index e5e5a5958c..1d3805a1b4 100644
--- a/ssl/d1_srvr.c
+++ b/ssl/d1_srvr.c
@@ -167,6 +167,8 @@ int dtls1_accept(SSL *s)
s->in_handshake++;
if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
+ s->d1->listen = listen;
+
if (s->cert == NULL)
{
SSLerr(SSL_F_DTLS1_ACCEPT,SSL_R_NO_CERTIFICATE_SET);
@@ -276,6 +278,12 @@ int dtls1_accept(SSL *s)
s->init_num=0;
+ /* Reflect ClientHello sequence to remain stateless while listening */
+ if (listen)
+ {
+ memcpy(s->s3->write_sequence, s->s3->read_sequence, sizeof(s->s3->write_sequence));
+ }
+
/* If we're just listening, stop here */
if (listen && s->state == SSL3_ST_SW_SRVR_HELLO_A)
{