Bug fix in ossl_cmp_hdr_init(): sould not remember recipient as expected sender
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Fri, 29 May 2020 15:11:48 +0000 (17:11 +0200)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Sat, 13 Jun 2020 13:13:21 +0000 (15:13 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11998)

crypto/cmp/cmp_hdr.c

index 4b98a598cd92cd6f8b1f65e44564b9853a0c46fa..364d89a9b0d37ce6e4d65ba6445133b97cff3a3f 100644 (file)
@@ -330,10 +330,6 @@ int ossl_cmp_hdr_init(OSSL_CMP_CTX *ctx, OSSL_CMP_PKIHEADER *hdr)
         rcp = X509_get_issuer_name(ctx->cert);
     if (!ossl_cmp_hdr_set1_recipient(hdr, rcp))
         return 0;
-    /* set also as expected_sender of responses unless set explicitly */
-    if (ctx->expected_sender == NULL && rcp != NULL
-        && !OSSL_CMP_CTX_set1_expected_sender(ctx, rcp))
-        return 0;
 
     /* set current time as message time */
     if (!ossl_cmp_hdr_update_messageTime(hdr))