diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-02-17 19:46:29 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2022-02-22 12:01:57 +0100 |
commit | cd7ec0bca00ceb6e8d4af46a57c6c096a7ed8947 (patch) | |
tree | f0c9eec493d9a5b9b59541ff5b72471e21a6a43c /crypto | |
parent | f596bbe4da779b56eea34d96168b557d78e1149a (diff) |
CMP: add subject of any provided CSR as default message sender
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17723)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/cmp/cmp_hdr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cmp/cmp_hdr.c b/crypto/cmp/cmp_hdr.c index e970e6cbd7..86966c3195 100644 --- a/crypto/cmp/cmp_hdr.c +++ b/crypto/cmp/cmp_hdr.c @@ -301,11 +301,12 @@ int ossl_cmp_hdr_init(OSSL_CMP_CTX *ctx, OSSL_CMP_PKIHEADER *hdr) return 0; /* - * If neither protection cert nor oldCert nor subject are given, + * If no protection cert nor oldCert nor CSR nor subject is given, * sender name is not known to the client and thus set to NULL-DN */ sender = ctx->cert != NULL ? X509_get_subject_name(ctx->cert) : ctx->oldCert != NULL ? X509_get_subject_name(ctx->oldCert) : + ctx->p10CSR != NULL ? X509_REQ_get_subject_name(ctx->p10CSR) : ctx->subjectName; if (!ossl_cmp_hdr_set1_sender(hdr, sender)) return 0; |