diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-19 20:16:53 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-11-27 16:53:32 +0100 |
commit | ee46dfbf2c117a9532f887b478c9c65d8f30d50c (patch) | |
tree | 1106cecd9a6cd196961caa1ccf7730508ee48d37 /crypto/x509/x_x509.c | |
parent | 4f7e08c83eca6667722f3d5848f28d37c821dc37 (diff) | |
download | openssl-new-ee46dfbf2c117a9532f887b478c9c65d8f30d50c.tar.gz |
X509_dup: fix copying of libctx and propq using new ASN1_OP_DUP_POST cb operation
Fixes #12680
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12687)
Diffstat (limited to 'crypto/x509/x_x509.c')
-rw-r--r-- | crypto/x509/x_x509.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c index f929fd2ae3..efcd7cd15c 100644 --- a/crypto/x509/x_x509.c +++ b/crypto/x509/x_x509.c @@ -97,6 +97,17 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, ASN1_OCTET_STRING_free(ret->distinguishing_id); break; + case ASN1_OP_DUP_POST: + { + X509 *old = exarg; + + ret->libctx = old->libctx; + ret->propq = old->propq; + } + break; + + default: + break; } return 1; |