From ae8ff109c1d80399a6a1c9f50aa37381bc3a1c5f Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Fri, 12 Nov 2021 12:48:29 +0100 Subject: [PATCH] cmp_server.c: Log received request type before checking details Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/16051) --- crypto/cmp/cmp_server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/cmp/cmp_server.c b/crypto/cmp/cmp_server.c index 6f3409468d0..7ce4662aee5 100644 --- a/crypto/cmp/cmp_server.c +++ b/crypto/cmp/cmp_server.c @@ -457,6 +457,9 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, } ctx = srv_ctx->ctx; backup_secret = ctx->secretValue; + req_type = OSSL_CMP_MSG_get_bodytype(req); + ossl_cmp_log1(DEBUG, ctx, + "received %s", ossl_cmp_bodytype_to_string(req_type)); /* * Some things need to be done already before validating the message in @@ -469,7 +472,6 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, if (!OSSL_CMP_CTX_set1_recipient(ctx, hdr->sender->d.directoryName)) goto err; - req_type = OSSL_CMP_MSG_get_bodytype(req); switch (req_type) { case OSSL_CMP_PKIBODY_IR: case OSSL_CMP_PKIBODY_CR: @@ -503,8 +505,6 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, #endif } } - ossl_cmp_log1(DEBUG, ctx, - "received %s", ossl_cmp_bodytype_to_string(req_type)); res = ossl_cmp_msg_check_update(ctx, req, unprotected_exception, srv_ctx->acceptUnprotected); -- 2.47.2