]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
OSSL_CMP_validate_msg(): fix check such that OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR...
authorDr. David von Oheimb <dev@ddvo.net>
Mon, 11 Mar 2024 11:48:26 +0000 (12:48 +0100)
committerDr. David von Oheimb <dev@ddvo.net>
Mon, 17 Jun 2024 08:54:03 +0000 (10:54 +0200)
Fixes #23706

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23814)

crypto/cmp/cmp_vfy.c

index ec99ab7fe58dd25070b9010027f5229371ab0005..47bf38b2af5dab9cbae70f71569476373dc663fc 100644 (file)
@@ -632,7 +632,7 @@ int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg)
     default:
         scrt = ctx->srvCert;
         if (scrt == NULL) {
-            if (ctx->trusted == NULL) {
+            if (ctx->trusted == NULL && ctx->secretValue != NULL) {
                 ossl_cmp_info(ctx, "no trust store nor pinned server cert available for verifying signature-based CMP message protection");
                 ERR_raise(ERR_LIB_CMP, CMP_R_MISSING_TRUST_ANCHOR);
                 return 0;