mirror of https://github.com/openssl/openssl.git
Fix openssl storeutl to allow serial + issuer
storeutl wants to enforce the use of issuer and serial together,
however the current code prevents to use them together and returns an
error if only one of them is specified.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19856)
(cherry picked from commit abdf35158e
)
This commit is contained in:
parent
f92b294563
commit
53c643f67f
|
@ -163,8 +163,7 @@ int storeutl_main(int argc, char *argv[])
|
|||
break;
|
||||
case OPT_CRITERION_ISSUER:
|
||||
if (criterion != 0
|
||||
|| (criterion == OSSL_STORE_SEARCH_BY_ISSUER_SERIAL
|
||||
&& issuer != NULL)) {
|
||||
&& criterion != OSSL_STORE_SEARCH_BY_ISSUER_SERIAL) {
|
||||
BIO_printf(bio_err, "%s: criterion already given.\n",
|
||||
prog);
|
||||
goto end;
|
||||
|
@ -181,8 +180,7 @@ int storeutl_main(int argc, char *argv[])
|
|||
break;
|
||||
case OPT_CRITERION_SERIAL:
|
||||
if (criterion != 0
|
||||
|| (criterion == OSSL_STORE_SEARCH_BY_ISSUER_SERIAL
|
||||
&& serial != NULL)) {
|
||||
&& criterion != OSSL_STORE_SEARCH_BY_ISSUER_SERIAL) {
|
||||
BIO_printf(bio_err, "%s: criterion already given.\n",
|
||||
prog);
|
||||
goto end;
|
||||
|
|
Loading…
Reference in New Issue