diff options
Diffstat (limited to 'openssl/ssl/d1_lib.c')
-rw-r--r-- | openssl/ssl/d1_lib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openssl/ssl/d1_lib.c b/openssl/ssl/d1_lib.c index 28457579b..ee78921ba 100644 --- a/openssl/ssl/d1_lib.c +++ b/openssl/ssl/d1_lib.c @@ -270,7 +270,7 @@ void dtls1_clear(SSL *s) ssl3_clear(s); if (s->options & SSL_OP_CISCO_ANYCONNECT) - s->version = DTLS1_BAD_VER; + s->client_version = s->version = DTLS1_BAD_VER; else if (s->method->version == DTLS_ANY_VERSION) s->version = DTLS1_2_VERSION; else @@ -543,6 +543,9 @@ int dtls1_listen(SSL *s, struct sockaddr *client) { int ret; + /* Ensure there is no state left over from a previous invocation */ + SSL_clear(s); + SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE); s->d1->listen = 1; |