Give more information in the SSL_stateless return code
[openssl.git] / ssl / ssl_lib.c
index accef0c0ce3d28179b596f2651ec98089b9cb90c..f5219c22d128944f34d3217e76f01cb8141aa245 100644 (file)
@@ -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)