Ctrl to retrieve extms support.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 23 Jan 2015 02:52:20 +0000 (02:52 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 3 Feb 2015 14:50:07 +0000 (14:50 +0000)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
ssl/ssl.h
ssl/ssl_lib.c

index df91c187fbab58d91a988703ff6787d550c48779..a3b8a81fe30738fe8522b5c487648cc4c35c62a6 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -656,6 +656,9 @@ void SSL_set_msg_callback(SSL *ssl,
 # define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
 # define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
 
+# define SSL_get_extms_support(s) \
+        SSL_ctrl((s),SSL_CTRL_GET_EXTMS_SUPPORT,0,NULL)
+
 # ifndef OPENSSL_NO_SRP
 
 /* see tls_srp.c */
@@ -1212,6 +1215,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
 # define SSL_CTRL_CHECK_PROTO_VERSION            119
 # define DTLS_CTRL_SET_LINK_MTU                  120
 # define DTLS_CTRL_GET_LINK_MIN_MTU              121
+# define SSL_CTRL_GET_EXTMS_SUPPORT              122
 # define SSL_CERT_SET_FIRST                      1
 # define SSL_CERT_SET_NEXT                       2
 # define SSL_CERT_SET_SERVER                     3
index 3392d1a6a9805b17bdbd3cb93bd6094e22b06fcc..d618d64bc54f7cf7d2f7ca8aebdbb88ae3c5eb27 100644 (file)
@@ -1134,6 +1134,11 @@ long SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
             return (int)s->cert->ciphers_rawlen;
         } 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)
+            return 1;
+        else
+            return 0;
     default:
         return (s->method->ssl_ctrl(s, cmd, larg, parg));
     }