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:34:46 +0100 |
commit | 53c643f67feda4937f1b7be0a27360b75e7ea79c (patch) | |
tree | 73b335b7054950c365320bd7cee321fbe4f3efc0 /apps | |
parent | f92b294563b31d59c30b6f50434482af2a00b625 (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)
(cherry picked from commit abdf35158e4398deedcf160c28bd07c7080edf47)
Diffstat (limited to 'apps')
-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 1368caae92..30c9915de3 100644 --- a/apps/storeutl.c +++ b/apps/storeutl.c @@ -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; |