Add BIO versions of i2d_DHparams and d2i_DHparams.

Change-Id: Ie643aaaa44aef67932b107d31ef92c2649738051
Reviewed-on: https://boringssl-review.googlesource.com/28269
Commit-Queue: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
David Benjamin 2018-05-08 18:59:58 -04:00 committed by CQ bot account: commit-bot@chromium.org
parent 02de7bd3a0
commit 8094b54eb1
2 changed files with 12 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);