diff options
author | Matt Caswell <matt@openssl.org> | 2017-09-28 13:24:58 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-01-24 18:02:36 +0000 |
commit | d6bb50a5f9201aab638ddf9131a6754cca0ef842 (patch) | |
tree | d1d992eeae9be952357253a8917a54d51cfae517 | |
parent | 808d1601612626b09eb4e8a098cd1edc5d105cfa (diff) |
Fix the SSL_stateless() return code
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
-rw-r--r-- | ssl/ssl_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 1daa348f9c..f68031e571 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -5303,7 +5303,7 @@ int SSL_stateless(SSL *s) /* Ensure there is no state left over from a previous invocation */ if (!SSL_clear(s)) - return -1; + return 0; ERR_clear_error(); @@ -5311,8 +5311,8 @@ int SSL_stateless(SSL *s) ret = SSL_accept(s); s->s3->flags &= ~TLS1_FLAGS_STATELESS; - if (s->ext.cookieok) + if (ret > 0 && s->ext.cookieok) return 1; - return ret; + return 0; } |