diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2016-02-02 23:58:49 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2016-03-09 19:38:56 +0100 |
commit | 0d5301aff900970b09d2fe0c70d1038157d7638b (patch) | |
tree | eccb37f83a5388dee8ec57cbb90eb3b404ea3be0 /apps/s_time.c | |
parent | 1fc7d6664a3d118f9d5de217c9ffd154ed9ddb6f (diff) |
Use minimum and maximum protocol version instead of version fixed methods
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MR: #1824
Diffstat (limited to 'apps/s_time.c')
-rw-r--r-- | apps/s_time.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/s_time.c b/apps/s_time.c index cc9a979755..f68002a224 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -132,7 +132,7 @@ OPTIONS s_time_options[] = { {"bugs", OPT_BUGS, '-', "Turn on SSL bug compatibility"}, {"verify", OPT_VERIFY, 'p', "Turn on peer certificate verification, set depth"}, - {"time", OPT_TIME, 'p', "Sf seconds to collect data, default" SECONDSSTR}, + {"time", OPT_TIME, 'p', "Seconds to collect data, default " SECONDSSTR}, {"www", OPT_WWW, 's', "Fetch specified page from the site"}, #ifndef OPENSSL_NO_SSL3 {"ssl3", OPT_SSL3, '-', "Just use SSLv3"}, @@ -162,6 +162,7 @@ int s_time_main(int argc, char **argv) 0, ver; long bytes_read = 0, finishtime = 0; OPTION_CHOICE o; + int max_version = 0; meth = TLS_client_method(); verify_depth = 0; @@ -230,9 +231,7 @@ int s_time_main(int argc, char **argv) } break; case OPT_SSL3: -#ifndef OPENSSL_NO_SSL3 - meth = SSLv3_client_method(); -#endif + max_version = SSL3_VERSION; break; } } @@ -251,6 +250,8 @@ int s_time_main(int argc, char **argv) goto end; SSL_CTX_set_quiet_shutdown(ctx, 1); + if (SSL_CTX_set_max_proto_version(ctx, max_version) == 0) + goto end; if (st_bugs) SSL_CTX_set_options(ctx, SSL_OP_ALL); |