summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-03-08 17:44:12 +0000
committerMatt Caswell <matt@openssl.org>2018-03-09 11:37:58 +0000
commite440f51395f10e307f720213bd75393e446024a3 (patch)
treeef5595dbe30c53cb2cb5c2e55a2c9ebaa47321a4 /ssl/ssl_lib.c
parent532f95783e2bff4d7f4e8086297ed8e0b25561f7 (diff)
Give more information in the SSL_stateless return code
Allow users to distinguish between an error occurring and an HRR being issued. Fixes #5549 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5562)
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index accef0c0ce..f5219c22d1 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -5352,7 +5352,10 @@ int SSL_stateless(SSL *s)
if (ret > 0 && s->ext.cookieok)
return 1;
- return 0;
+ if (s->hello_retry_request == SSL_HRR_PENDING && !ossl_statem_in_error(s))
+ return 0;
+
+ return -1;
}
void SSL_force_post_handshake_auth(SSL *ssl)