mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
CMP: prevent misleading PKIStatusInfo output if not response available
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13409)
This commit is contained in:
parent
6fd8313589
commit
8c5c2fa544
@ -2870,6 +2870,8 @@ int cmp_main(int argc, char **argv)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (OSSL_CMP_CTX_get_status(cmp_ctx) < 0)
|
||||
goto err; /* we got no response, maybe even did not send request */
|
||||
|
||||
{
|
||||
/* print PKIStatusInfo */
|
||||
|
@ -886,6 +886,7 @@ STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx)
|
||||
ERR_raise(ERR_LIB_CMP, CMP_R_INVALID_ARGS);
|
||||
return 0;
|
||||
}
|
||||
ctx->status = -1;
|
||||
|
||||
if ((genm = ossl_cmp_genm_new(ctx)) == NULL)
|
||||
goto err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user