diff options
author | Simo Sorce <simo@redhat.com> | 2022-12-07 18:50:51 -0500 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-12-14 09:33:25 +0100 |
commit | abdf35158e4398deedcf160c28bd07c7080edf47 (patch) | |
tree | 8aee31a09ec2a97e8b4c71fa1cb145cc6cb10f4c | |
parent | dc45d4c6faeb53bb68401141d899b9f857bbc51d (diff) |
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)
-rw-r--r-- | apps/storeutl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/storeutl.c b/apps/storeutl.c index 6858680f82..249dc75c83 100644 --- a/apps/storeutl.c +++ b/apps/storeutl.c @@ -165,8 +165,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; @@ -183,8 +182,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; |