From 599eccfcbf8d77eb7c89b6338fdc39a7531a9f82 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Wed, 9 Mar 2016 20:56:43 -0500 Subject: [PATCH] RT3676 add: Export ASN.1 DHparams Reviewed-by: Dr. Stephen Henson --- crypto/dh/dh_asn1.c | 2 +- include/openssl/dh.h | 3 +++ util/libcrypto.num | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crypto/dh/dh_asn1.c b/crypto/dh/dh_asn1.c index d8ac810d22..8ea9550000 100644 --- a/crypto/dh/dh_asn1.c +++ b/crypto/dh/dh_asn1.c @@ -84,7 +84,7 @@ ASN1_SEQUENCE_cb(DHparams, dh_cb) = { ASN1_SIMPLE(DH, p, BIGNUM), ASN1_SIMPLE(DH, g, BIGNUM), ASN1_OPT(DH, length, ZLONG), -} static_ASN1_SEQUENCE_END_cb(DH, DHparams) +} ASN1_SEQUENCE_END_cb(DH, DHparams) IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DH, DHparams, DHparams) diff --git a/include/openssl/dh.h b/include/openssl/dh.h index 50f8e51c08..e852cbe446 100644 --- a/include/openssl/dh.h +++ b/include/openssl/dh.h @@ -66,6 +66,7 @@ # endif # include +# include # include # if OPENSSL_API_COMPAT < 0x10100000L # include @@ -159,6 +160,8 @@ struct dh_st { CRYPTO_RWLOCK *lock; }; +DECLARE_ASN1_ITEM(DHparams) + # define DH_GENERATOR_2 2 /* #define DH_GENERATOR_3 3 */ # define DH_GENERATOR_5 5 diff --git a/util/libcrypto.num b/util/libcrypto.num index 78c66df81b..727948da48 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -4058,3 +4058,5 @@ ECPARAMETERS_it 3922 1_1_0 EXIST:EXPORT_VAR_AS_FUNCTION: ECPKPARAMETERS_it 3923 1_1_0 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:EC ECPKPARAMETERS_it 3923 1_1_0 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:EC EC_GROUP_get_ecparameters 3924 1_1_0 EXIST::FUNCTION:EC +DHparams_it 3925 1_1_0 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:DH +DHparams_it 3925 1_1_0 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:DH -- 2.25.1