diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/apps.c | 12 | ||||
-rw-r--r-- | src/usr.bin/openssl/apps.h | 3 | ||||
-rw-r--r-- | src/usr.bin/openssl/s_time.c | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index 2902fb7e99..7c8df2b322 100644 --- a/src/usr.bin/openssl/apps.c +++ b/src/usr.bin/openssl/apps.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: apps.c,v 1.38 2016/08/26 15:04:15 deraadt Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.39 2016/08/30 14:34:59 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -2272,6 +2272,16 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed, | |||
2272 | *opt->opt.lvalue = (long)val; | 2272 | *opt->opt.lvalue = (long)val; |
2273 | break; | 2273 | break; |
2274 | 2274 | ||
2275 | case OPTION_ARG_TIME: | ||
2276 | val = strtonum(argv[i], 0, LLONG_MAX, &errstr); | ||
2277 | if (errstr != NULL) { | ||
2278 | fprintf(stderr, "%s %s argument for -%s\n", | ||
2279 | errstr, opt->argname, opt->name); | ||
2280 | return (1); | ||
2281 | } | ||
2282 | *opt->opt.tvalue = val; | ||
2283 | break; | ||
2284 | |||
2275 | case OPTION_DISCARD: | 2285 | case OPTION_DISCARD: |
2276 | break; | 2286 | break; |
2277 | 2287 | ||
diff --git a/src/usr.bin/openssl/apps.h b/src/usr.bin/openssl/apps.h index 217931a4b1..4276e533f7 100644 --- a/src/usr.bin/openssl/apps.h +++ b/src/usr.bin/openssl/apps.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: apps.h,v 1.18 2016/08/30 11:30:14 deraadt Exp $ */ | 1 | /* $OpenBSD: apps.h,v 1.19 2016/08/30 14:34:59 deraadt 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 | * |
@@ -294,6 +294,7 @@ struct option { | |||
294 | OPTION_ARG_FUNC, | 294 | OPTION_ARG_FUNC, |
295 | OPTION_ARG_INT, | 295 | OPTION_ARG_INT, |
296 | OPTION_ARG_LONG, | 296 | OPTION_ARG_LONG, |
297 | OPTION_ARG_TIME, | ||
297 | OPTION_DISCARD, | 298 | OPTION_DISCARD, |
298 | OPTION_FUNC, | 299 | OPTION_FUNC, |
299 | OPTION_FLAG, | 300 | OPTION_FLAG, |
diff --git a/src/usr.bin/openssl/s_time.c b/src/usr.bin/openssl/s_time.c index 6df03af41c..a88df1bfe2 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.15 2016/08/30 11:30:14 deraadt Exp $ */ | 1 | /* $OpenBSD: s_time.c,v 1.16 2016/08/30 14:34:59 deraadt 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 | * |
@@ -194,7 +194,7 @@ struct option s_time_options[] = { | |||
194 | .name = "time", | 194 | .name = "time", |
195 | .argname = "seconds", | 195 | .argname = "seconds", |
196 | .desc = "Duration to perform timing tests for (default 30)", | 196 | .desc = "Duration to perform timing tests for (default 30)", |
197 | .type = OPTION_ARG_INT, | 197 | .type = OPTION_ARG_TIME, |
198 | .opt.tvalue = &s_time_config.maxtime, | 198 | .opt.tvalue = &s_time_config.maxtime, |
199 | }, | 199 | }, |
200 | { | 200 | { |