diff options
Diffstat (limited to 'src/usr.bin/openssl/s_time.c')
| -rw-r--r-- | src/usr.bin/openssl/s_time.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/usr.bin/openssl/s_time.c b/src/usr.bin/openssl/s_time.c index 2e7c97dbae..e49c741dee 100644 --- a/src/usr.bin/openssl/s_time.c +++ b/src/usr.bin/openssl/s_time.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s_time.c,v 1.6 2015/04/14 12:56:36 jsing Exp $ */ | 1 | /* $OpenBSD: s_time.c,v 1.7 2015/04/15 16:33:49 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -94,6 +94,8 @@ | |||
| 94 | #define max(a,b) (((a) > (b)) ? (a) : (b)) | 94 | #define max(a,b) (((a) > (b)) ? (a) : (b)) |
| 95 | 95 | ||
| 96 | #define SECONDS 30 | 96 | #define SECONDS 30 |
| 97 | extern int verify_depth; | ||
| 98 | extern int verify_error; | ||
| 97 | 99 | ||
| 98 | static void s_time_usage(void); | 100 | static void s_time_usage(void); |
| 99 | static SSL *doConnection(SSL * scon); | 101 | static SSL *doConnection(SSL * scon); |
| @@ -300,7 +302,15 @@ s_time_main(int argc, char **argv) | |||
| 300 | 302 | ||
| 301 | if (s_time_config.bugs) | 303 | if (s_time_config.bugs) |
| 302 | SSL_CTX_set_options(tm_ctx, SSL_OP_ALL); | 304 | SSL_CTX_set_options(tm_ctx, SSL_OP_ALL); |
| 303 | SSL_CTX_set_cipher_list(tm_ctx, s_time_config.cipher); | 305 | |
| 306 | if (s_time_config.cipher != NULL) { | ||
| 307 | if (!SSL_CTX_set_cipher_list(tm_ctx, s_time_config.cipher)) { | ||
| 308 | BIO_printf(bio_err, "error setting cipher list\n"); | ||
| 309 | ERR_print_errors(bio_err); | ||
| 310 | goto end; | ||
| 311 | } | ||
| 312 | } | ||
| 313 | |||
| 304 | if (!set_cert_stuff(tm_ctx, s_time_config.certfile, | 314 | if (!set_cert_stuff(tm_ctx, s_time_config.certfile, |
| 305 | s_time_config.keyfile)) | 315 | s_time_config.keyfile)) |
| 306 | goto end; | 316 | goto end; |
| @@ -315,12 +325,7 @@ s_time_main(int argc, char **argv) | |||
| 315 | ERR_print_errors(bio_err); | 325 | ERR_print_errors(bio_err); |
| 316 | /* goto end; */ | 326 | /* goto end; */ |
| 317 | } | 327 | } |
| 318 | if (s_time_config.cipher == NULL) | ||
| 319 | s_time_config.cipher = getenv("SSL_CIPHER"); | ||
| 320 | 328 | ||
| 321 | if (s_time_config.cipher == NULL) { | ||
| 322 | fprintf(stderr, "No CIPHER specified\n"); | ||
| 323 | } | ||
| 324 | if (!(s_time_config.perform & 1)) | 329 | if (!(s_time_config.perform & 1)) |
| 325 | goto next; | 330 | goto next; |
| 326 | printf("Collecting connection statistics for %d seconds\n", | 331 | printf("Collecting connection statistics for %d seconds\n", |
