summaryrefslogtreecommitdiffstats
path: root/crypto/cmp/cmp_msg.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-08-12 22:15:24 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-08-21 09:04:12 +0200
commitcac30a69bcadcfcf5beb034abf958bbcdb8b83cb (patch)
treea42db2d32d4928c44b7421aa2a8d9bb9cc3aacef /crypto/cmp/cmp_msg.c
parent28e9f62b2dd5f59218bd7d5c3ef877dd06e5eb97 (diff)
cmp_msg.c: Copy libctx and propq of CMP_CTX to newly enrolled certificate
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11808)
Diffstat (limited to 'crypto/cmp/cmp_msg.c')
-rw-r--r--crypto/cmp/cmp_msg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/cmp/cmp_msg.c b/crypto/cmp/cmp_msg.c
index d506e7b22b..9e402c51a5 100644
--- a/crypto/cmp/cmp_msg.c
+++ b/crypto/cmp/cmp_msg.c
@@ -19,6 +19,7 @@
#include <openssl/crmf.h>
#include <openssl/err.h>
#include <openssl/x509.h>
+#include "crypto/x509.h" /* for x509_set0_libctx() */
DEFINE_STACK_OF(OSSL_CMP_CERTSTATUS)
DEFINE_STACK_OF(OSSL_CMP_ITAV)
@@ -994,6 +995,8 @@ X509 *ossl_cmp_certresponse_get1_certificate(EVP_PKEY *privkey,
}
if (crt == NULL)
CMPerr(0, CMP_R_CERTIFICATE_NOT_FOUND);
+ else
+ (void)x509_set0_libctx(crt, ctx->libctx, ctx->propq);
return crt;
}