summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ssl/d1_lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index 20970c3f02..c1d160ecd4 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -432,6 +432,11 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client)
BIO_ADDR *tmpclient = NULL;
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 */
if (!SSL_clear(s))
return -1;