diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/usr.bin/openssl/apps.c | 10 | ||||
-rw-r--r-- | src/usr.bin/openssl/apps.h | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index d3c31947f3..5a6bb7a2ee 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.22 2014/12/28 16:51:31 jsing Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.23 2015/01/01 14:28:00 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -2359,6 +2359,14 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed, | |||
2359 | *opt->opt.value = opt->value; | 2359 | *opt->opt.value = opt->value; |
2360 | break; | 2360 | break; |
2361 | 2361 | ||
2362 | case OPTION_VALUE_AND: | ||
2363 | *opt->opt.value &= opt->value; | ||
2364 | break; | ||
2365 | |||
2366 | case OPTION_VALUE_OR: | ||
2367 | *opt->opt.value |= opt->value; | ||
2368 | break; | ||
2369 | |||
2362 | default: | 2370 | default: |
2363 | fprintf(stderr, "option %s - unknown type %i\n", | 2371 | fprintf(stderr, "option %s - unknown type %i\n", |
2364 | opt->name, opt->type); | 2372 | opt->name, opt->type); |
diff --git a/src/usr.bin/openssl/apps.h b/src/usr.bin/openssl/apps.h index f0571480e2..dddfeeea7f 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.12 2014/12/28 16:22:37 jsing Exp $ */ | 1 | /* $OpenBSD: apps.h,v 1.13 2015/01/01 14:28:00 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 | * |
@@ -290,10 +290,13 @@ struct option { | |||
290 | OPTION_ARG_FORMAT, | 290 | OPTION_ARG_FORMAT, |
291 | OPTION_ARG_FUNC, | 291 | OPTION_ARG_FUNC, |
292 | OPTION_ARG_INT, | 292 | OPTION_ARG_INT, |
293 | OPTION_DISCARD, | ||
293 | OPTION_FUNC, | 294 | OPTION_FUNC, |
294 | OPTION_FLAG, | 295 | OPTION_FLAG, |
295 | OPTION_FLAG_ORD, | 296 | OPTION_FLAG_ORD, |
296 | OPTION_VALUE, | 297 | OPTION_VALUE, |
298 | OPTION_VALUE_AND, | ||
299 | OPTION_VALUE_OR, | ||
297 | } type; | 300 | } type; |
298 | union { | 301 | union { |
299 | char **arg; | 302 | char **arg; |