Support "-min_protocol" and "-max_protocol" in s_server and s_client
authorRichard Levitte <levitte@openssl.org>
Mon, 19 Mar 2018 06:48:33 +0000 (07:48 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 19 Mar 2018 07:46:29 +0000 (08:46 +0100)
If for nothing else, they are needed when doing a regression test

Partially fixes #5661

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5662)

apps/apps.h

index 7e4d4e9075b532ba5671c37287d3b3f62d1cb213..d705d0e8349b1f15c0aef039d334fe5c285f704e 100644 (file)
@@ -214,7 +214,7 @@ int set_cert_times(X509 *x, const char *startdate, const char *enddate,
         OPT_S_SERVERPREF, OPT_S_LEGACYRENEG, OPT_S_LEGACYCONN, \
         OPT_S_ONRESUMP, OPT_S_NOLEGACYCONN, OPT_S_STRICT, OPT_S_SIGALGS, \
         OPT_S_CLIENTSIGALGS, OPT_S_CURVES, OPT_S_NAMEDCURVE, OPT_S_CIPHER, \
-        OPT_S_DEBUGBROKE, OPT_S_COMP, \
+        OPT_S_DEBUGBROKE, OPT_S_COMP, OPT_S_MINPROTO, OPT_S_MAXPROTO, \
         OPT_S_NO_RENEGOTIATION, OPT_S__LAST
 
 # define OPT_S_OPTIONS \
@@ -250,6 +250,8 @@ int set_cert_times(X509 *x, const char *startdate, const char *enddate,
         {"named_curve", OPT_S_NAMEDCURVE, 's', \
             "Elliptic curve used for ECDHE (server-side only)" }, \
         {"cipher", OPT_S_CIPHER, 's', "Specify cipher list to be used"}, \
+        {"min_protocol", OPT_S_MINPROTO, 's', "Specify the minimum protocol version to be used"}, \
+        {"max_protocol", OPT_S_MAXPROTO, 's', "Specify the maximum protocol version to be used"}, \
         {"debug_broken_protocol", OPT_S_DEBUGBROKE, '-', \
             "Perform all sorts of protocol violations for testing purposes"}
 
@@ -274,6 +276,8 @@ int set_cert_times(X509 *x, const char *startdate, const char *enddate,
         case OPT_S_CURVES: \
         case OPT_S_NAMEDCURVE: \
         case OPT_S_CIPHER: \
+        case OPT_S_MINPROTO: \
+        case OPT_S_MAXPROTO: \
         case OPT_S_NO_RENEGOTIATION: \
         case OPT_S_DEBUGBROKE