summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa/dsa_asn1.c
diff options
context:
space:
mode:
authorjsing <>2016-11-04 18:35:30 +0000
committerjsing <>2016-11-04 18:35:30 +0000
commitf1bfac5c0c9b216325ace4860e9de46713ed5a5c (patch)
tree41f976be7b68c4759d7cf5c7c84fbbfda018a16c /src/lib/libcrypto/dsa/dsa_asn1.c
parent817ad1345229aa439c24508d4db10738c0825797 (diff)
downloadopenbsd-f1bfac5c0c9b216325ace4860e9de46713ed5a5c.tar.gz
openbsd-f1bfac5c0c9b216325ace4860e9de46713ed5a5c.tar.bz2
openbsd-f1bfac5c0c9b216325ace4860e9de46713ed5a5c.zip
Kill a bunch of OLD_ASN1 usage by replacing ASN1_{d2i,i2d}_* with
ASN1_item_{d2i,i2d}_* equivalents. ok guenther@ miod@
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_asn1.c')
-rw-r--r--src/lib/libcrypto/dsa/dsa_asn1.c26
1 files changed, 25 insertions, 1 deletions
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 @@
1/* $OpenBSD: dsa_asn1.c,v 1.16 2015/02/14 15:06:55 jsing Exp $ */ 1/* $OpenBSD: dsa_asn1.c,v 1.17 2016/11/04 18:35:30 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -283,6 +283,30 @@ i2d_DSAparams(const DSA *a, unsigned char **out)
283 return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAparams_it); 283 return ASN1_item_i2d((ASN1_VALUE *)a, out, &DSAparams_it);
284} 284}
285 285
286DSA *
287d2i_DSAparams_bio(BIO *bp, DSA **a)
288{
289 return ASN1_item_d2i_bio(&DSAparams_it, bp, a);
290}
291
292int
293i2d_DSAparams_bio(BIO *bp, DSA *a)
294{
295 return ASN1_item_i2d_bio(&DSAparams_it, bp, a);
296}
297
298DSA *
299d2i_DSAparams_fp(FILE *fp, DSA **a)
300{
301 return ASN1_item_d2i_fp(&DSAparams_it, fp, a);
302}
303
304int
305i2d_DSAparams_fp(FILE *fp, DSA *a)
306{
307 return ASN1_item_i2d_fp(&DSAparams_it, fp, a);
308}
309
286/* 310/*
287 * DSA public key is a bit trickier... its effectively a CHOICE type 311 * DSA public key is a bit trickier... its effectively a CHOICE type
288 * decided by a field called write_params which can either write out 312 * decided by a field called write_params which can either write out