diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c index c430a7d3..2a93b873 100644 --- a/crypto/x509/x_all.c +++ b/crypto/x509/x_all.c @@ -499,3 +499,13 @@ EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a) { return ASN1_d2i_bio_of(EVP_PKEY, EVP_PKEY_new, d2i_PUBKEY, bp, a); } + +DH *d2i_DHparams_bio(BIO *bp, DH **dh) +{ + return ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, dh); +} + +int i2d_DHparams_bio(BIO *bp, const DH *dh) +{ + return ASN1_i2d_bio_of_const(DH, i2d_DHparams, bp, dh); +} diff --git a/include/openssl/x509.h b/include/openssl/x509.h index 65d68c4b..a0f7645b 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -671,6 +671,8 @@ OPENSSL_EXPORT int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); OPENSSL_EXPORT EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); OPENSSL_EXPORT int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); OPENSSL_EXPORT EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); +OPENSSL_EXPORT DH *d2i_DHparams_bio(BIO *bp, DH **dh); +OPENSSL_EXPORT int i2d_DHparams_bio(BIO *bp, const DH *dh); OPENSSL_EXPORT X509 *X509_dup(X509 *x509); OPENSSL_EXPORT X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);