summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/apps.c
diff options
context:
space:
mode:
authorinoguchi <>2021-03-24 12:07:39 +0000
committerinoguchi <>2021-03-24 12:07:39 +0000
commit5129f427750164d91485e246e88bc28013ac7567 (patch)
treea6475327c85ffbf84cc90fb595ed626303422704 /src/usr.bin/openssl/apps.c
parent22638d4b1be941de65b47260040fef489ae2afe9 (diff)
downloadopenbsd-5129f427750164d91485e246e88bc28013ac7567.tar.gz
openbsd-5129f427750164d91485e246e88bc28013ac7567.tar.bz2
openbsd-5129f427750164d91485e246e88bc28013ac7567.zip
Add option type OPTION_ORDER
To handle incremental order value, added new option type OPTION_ORDER. openssl(1) x509 requires this option handling, since, - -CA and -signkey require to set both filename and incremental 'num'. - -dates requires to set two variables in a row, startdate and enddate. and this couldn't be solved by OPTION_FLAG_ORD. ok tb@ and "I'd move forward with your current plan." from jsing@
Diffstat (limited to 'src/usr.bin/openssl/apps.c')
-rw-r--r--src/usr.bin/openssl/apps.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c
index 24a28c7ca5..396a693c6f 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.58 2021/03/17 18:08:32 jsing Exp $ */ 1/* $OpenBSD: apps.c,v 1.59 2021/03/24 12:07:39 inoguchi Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -2304,6 +2304,10 @@ options_parse(int argc, char **argv, const struct option *opts, char **unnamed,
2304 *opt->opt.ulvalue |= opt->ulvalue; 2304 *opt->opt.ulvalue |= opt->ulvalue;
2305 break; 2305 break;
2306 2306
2307 case OPTION_ORDER:
2308 *opt->opt.order = ++(*opt->order);
2309 break;
2310
2307 default: 2311 default:
2308 fprintf(stderr, "option %s - unknown type %i\n", 2312 fprintf(stderr, "option %s - unknown type %i\n",
2309 opt->name, opt->type); 2313 opt->name, opt->type);