summaryrefslogtreecommitdiffstats
path: root/crypto/dh/dh_asn1.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-09-06 15:49:46 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-09-06 15:49:46 +0000
commitf4274da164c44699f980f5c897bc7f7727233337 (patch)
tree958dd498eb89320cbe94d0424c5b865d4009bcd9 /crypto/dh/dh_asn1.c
parent07a9d1a2c2b735cbc327065000b545deb5e136cf (diff)
PR: 1644
Submitted by: steve@openssl.org Fix to make DHparams_dup() et al work in C++. For 1.0 fix the final argument to ASN1_dup() so it is void *. Replace some *_dup macros with functions.
Diffstat (limited to 'crypto/dh/dh_asn1.c')
-rw-r--r--crypto/dh/dh_asn1.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/dh/dh_asn1.c b/crypto/dh/dh_asn1.c
index a02b560572..0b4357d605 100644
--- a/crypto/dh/dh_asn1.c
+++ b/crypto/dh/dh_asn1.c
@@ -86,3 +86,8 @@ ASN1_SEQUENCE_cb(DHparams, dh_cb) = {
} ASN1_SEQUENCE_END_cb(DH, DHparams)
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DH, DHparams, DHparams)
+
+DH *DHparams_dup(DH *dh)
+ {
+ return ASN1_item_dup(ASN1_ITEM_rptr(DHparams), dh);
+ }