mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-04-30 03:34:39 +00:00
Ensure we are in accept state in DTLSv1_listen
Calling SSL_set_accept_state() after DTLSv1_listen() clears the state, so SSL_accept() no longer works. In 1.0.2 calling DTLSv1_listen() would set the accept state automatically. We should still do that. Fixes #1989 Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
parent
8d1ebff41c
commit
5bdcd362d2
@ -432,6 +432,11 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client)
|
|||||||
BIO_ADDR *tmpclient = NULL;
|
BIO_ADDR *tmpclient = NULL;
|
||||||
PACKET pkt, msgpkt, msgpayload, session, cookiepkt;
|
PACKET pkt, msgpkt, msgpayload, session, cookiepkt;
|
||||||
|
|
||||||
|
if (s->handshake_func == NULL) {
|
||||||
|
/* Not properly initialized yet */
|
||||||
|
SSL_set_accept_state(s);
|
||||||
|
}
|
||||||
|
|
||||||
/* Ensure there is no state left over from a previous invocation */
|
/* Ensure there is no state left over from a previous invocation */
|
||||||
if (!SSL_clear(s))
|
if (!SSL_clear(s))
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user