PR: 2555
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Fix DTLS sequence number bug
This commit is contained in:
parent
4ba063d3c5
commit
ac02a4b68a
@ -165,6 +165,8 @@ int dtls1_accept(SSL *s)
|
|||||||
s->in_handshake++;
|
s->in_handshake++;
|
||||||
if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
|
if (!SSL_in_init(s) || SSL_in_before(s)) SSL_clear(s);
|
||||||
|
|
||||||
|
s->d1->listen = listen;
|
||||||
|
|
||||||
if (s->cert == NULL)
|
if (s->cert == NULL)
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_DTLS1_ACCEPT,SSL_R_NO_CERTIFICATE_SET);
|
SSLerr(SSL_F_DTLS1_ACCEPT,SSL_R_NO_CERTIFICATE_SET);
|
||||||
@ -274,6 +276,12 @@ int dtls1_accept(SSL *s)
|
|||||||
|
|
||||||
s->init_num=0;
|
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 we're just listening, stop here */
|
||||||
if (listen && s->state == SSL3_ST_SW_SRVR_HELLO_A)
|
if (listen && s->state == SSL3_ST_SW_SRVR_HELLO_A)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user