]> 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:55:51 +0000 (10:55 +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)

(cherry picked from commit b893ceef2feb6b64504446f984ee5a57d2b69d1f)

crypto/cmp/cmp_vfy.c

index 7ce91ec5d16792a58bb32968a2108cbce1cfdd90..7156bfe367fc5e20cb4df16436a162efc62d295d 100644 (file)
@@ -619,7 +619,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;