Skip to content

Commit

Permalink
Fix openssl storeutl to allow serial + issuer
Browse files Browse the repository at this point in the history
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 #19856)
  • Loading branch information
simo5 authored and t8m committed Dec 14, 2022
1 parent dc45d4c commit abdf351
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/storeutl.c
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit abdf351

Please sign in to comment.