提交 d6bb50a5 编写于 作者: M Matt Caswell

Fix the SSL_stateless() return code

Reviewed-by: NBen Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4435)
上级 808d1601
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册