From f1bfac5c0c9b216325ace4860e9de46713ed5a5c Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 4 Nov 2016 18:35:30 +0000 Subject: Kill a bunch of OLD_ASN1 usage by replacing ASN1_{d2i,i2d}_* with ASN1_item_{d2i,i2d}_* equivalents. ok guenther@ miod@ --- src/lib/libcrypto/dsa/dsa_asn1.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/dsa/dsa_asn1.c') diff --git a/src/lib/libcrypto/dsa/dsa_asn1.c b/src/lib/libcrypto/dsa/dsa_asn1.c index 8c5d93105c..6366acdd79 100644 --- a/src/lib/libcrypto/dsa/dsa_asn1.c +++ b/src/lib/libcrypto/dsa/dsa_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa_asn1.c,v 1.16 2015/02/14 15:06:55 jsing Exp $ */ +/* $OpenBSD: dsa_asn1.c,v 1.17 2016/11/04 18:35:30 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -283,6 +283,30 @@ i2d_DSAparams(const DSA *a, unsigned char **out) return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAparams_it); } +DSA * +d2i_DSAparams_bio(BIO *bp, DSA **a) +{ + return ASN1_item_d2i_bio(&DSAparams_it, bp, a); +} + +int +i2d_DSAparams_bio(BIO *bp, DSA *a) +{ + return ASN1_item_i2d_bio(&DSAparams_it, bp, a); +} + +DSA * +d2i_DSAparams_fp(FILE *fp, DSA **a) +{ + return ASN1_item_d2i_fp(&DSAparams_it, fp, a); +} + +int +i2d_DSAparams_fp(FILE *fp, DSA *a) +{ + return ASN1_item_i2d_fp(&DSAparams_it, fp, a); +} + /* * DSA public key is a bit trickier... its effectively a CHOICE type * decided by a field called write_params which can either write out -- cgit v1.2.3-55-g6feb