summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_stat.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-04-23 20:01:33 +0100
committerMatt Caswell <matt@openssl.org>2015-05-05 19:45:17 +0100
commita89db885e0d8aac3a9df1bbccb0c1ddfd8b2e10a (patch)
tree85276802786a6d323b82c2ee95890bc24cb1ac88 /ssl/ssl_stat.c
parenta28ef860be371e45f4818b22be378519538d70f9 (diff)
Add Error state
Reusing an SSL object when it has encountered a fatal error can have bad consequences. This is a bug in application code not libssl but libssl should be more forgiving and not crash. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/ssl_stat.c')
-rw-r--r--ssl/ssl_stat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/ssl_stat.c b/ssl/ssl_stat.c
index 258c4eb2b4..76b550cda3 100644
--- a/ssl/ssl_stat.c
+++ b/ssl/ssl_stat.c
@@ -117,6 +117,9 @@ const char *SSL_state_string_long(const SSL *s)
case SSL_ST_OK | SSL_ST_ACCEPT:
str = "ok/accept SSL initialization";
break;
+ case SSL_ST_ERR:
+ str = "error";
+ break;
#ifndef OPENSSL_NO_SSL3
/* SSLv3 additions */
@@ -360,6 +363,9 @@ const char *SSL_state_string(const SSL *s)
case SSL_ST_OK:
str = "SSLOK ";
break;
+ case SSL_ST_ERR:
+ str = "SSLERR";
+ break;
#ifndef OPENSSL_NO_SSL3
/* SSLv3 additions */