Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15126)
int valtype;
const char *helpstr;
} OPTIONS;
+/* Special retval values: */
+#define OPT_PARAM 0 /* same as OPT_EOF usually defined in apps */
/*
* A string/int pairing; widely use for option value lookup, hence the
/* Make sure options are legit. */
OPENSSL_assert(o->name[0] != '-');
- OPENSSL_assert(o->retval > 0);
+ if (o->valtype == '.')
+ OPENSSL_assert(o->retval == OPT_PARAM);
+ else
+ OPENSSL_assert(o->retval > OPT_PARAM);
switch (i) {
- case 0: case '-': case '/': case '<': case '>': case 'E': case 'F':
+ case 0: case '-': case '.':
+ case '/': case '<': case '>': case 'E': case 'F':
case 'M': case 'U': case 'f': case 'l': case 'n': case 'p': case 's':
case 'u': case 'c': case ':': case 'N':
break;
case ':':
/* Just a string. */
break;
+ case '.':
+ /* Parameters */
+ break;
case '/':
if (opt_isdir(arg) > 0)
break;