summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-01-24 17:09:55 +0000
committerDr. Stephen Henson <steve@openssl.org>2015-02-03 14:50:08 +0000
commit156a872233b56558c72561789b8f33ff71a88fa7 (patch)
treed3191cd09ec050b2f5adee82bfb8dc20b6250c14 /ssl
parent6668b6b8b0c1bcb6c6168ab22159a12cac41ae79 (diff)
Add SSL_get_extms_support documentation.
Document SSL_get_extms_support(). Modify behaviour of SSL_get_extms_support() so it returns -1 if the master secret support of the peer is not known (e.g. handshake in progress). Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index d618d64bc5..bcb6be133a 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1135,7 +1135,9 @@ long SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
} else
return ssl_put_cipher_by_char(s, NULL, NULL);
case SSL_CTRL_GET_EXTMS_SUPPORT:
- if (s->session && s->session->flags & SSL_SESS_FLAG_EXTMS)
+ if (!s->session || SSL_in_init(s) || s->in_handshake)
+ return -1;
+ if (s->session->flags & SSL_SESS_FLAG_EXTMS)
return 1;
else
return 0;