summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ts
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/ts
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/ts')
-rw-r--r--src/lib/libcrypto/ts/ts_asn1.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/lib/libcrypto/ts/ts_asn1.c b/src/lib/libcrypto/ts/ts_asn1.c
index 1386483247..49232d8073 100644
--- a/src/lib/libcrypto/ts/ts_asn1.c
+++ b/src/lib/libcrypto/ts/ts_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_asn1.c,v 1.9 2015/07/24 15:25:44 jsing Exp $ */ 1/* $OpenBSD: ts_asn1.c,v 1.10 2016/11/04 18:35:30 jsing Exp $ */
2/* Written by Nils Larsch for the OpenSSL project 2004. 2/* Written by Nils Larsch for the OpenSSL project 2004.
3 */ 3 */
4/* ==================================================================== 4/* ====================================================================
@@ -124,28 +124,26 @@ TS_MSG_IMPRINT_dup(TS_MSG_IMPRINT *x)
124TS_MSG_IMPRINT * 124TS_MSG_IMPRINT *
125d2i_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT **a) 125d2i_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT **a)
126{ 126{
127 return ASN1_d2i_bio_of(TS_MSG_IMPRINT, TS_MSG_IMPRINT_new, 127 return ASN1_item_d2i_bio(&TS_MSG_IMPRINT_it, bp, a);
128 d2i_TS_MSG_IMPRINT, bp, a);
129} 128}
130 129
131int 130int
132i2d_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT *a) 131i2d_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT *a)
133{ 132{
134 return ASN1_i2d_bio_of_const(TS_MSG_IMPRINT, i2d_TS_MSG_IMPRINT, bp, a); 133 return ASN1_item_i2d_bio(&TS_MSG_IMPRINT_it, bp, a);
135} 134}
136#endif 135#endif
137 136
138TS_MSG_IMPRINT * 137TS_MSG_IMPRINT *
139d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a) 138d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a)
140{ 139{
141 return ASN1_d2i_fp_of(TS_MSG_IMPRINT, TS_MSG_IMPRINT_new, 140 return ASN1_item_d2i_fp(&TS_MSG_IMPRINT_it, fp, a);
142 d2i_TS_MSG_IMPRINT, fp, a);
143} 141}
144 142
145int 143int
146i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a) 144i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a)
147{ 145{
148 return ASN1_i2d_fp_of_const(TS_MSG_IMPRINT, i2d_TS_MSG_IMPRINT, fp, a); 146 return ASN1_item_i2d_fp(&TS_MSG_IMPRINT_it, fp, a);
149} 147}
150 148
151static const ASN1_TEMPLATE TS_REQ_seq_tt[] = { 149static const ASN1_TEMPLATE TS_REQ_seq_tt[] = {
@@ -239,26 +237,26 @@ TS_REQ_dup(TS_REQ *x)
239TS_REQ * 237TS_REQ *
240d2i_TS_REQ_bio(BIO *bp, TS_REQ **a) 238d2i_TS_REQ_bio(BIO *bp, TS_REQ **a)
241{ 239{
242 return ASN1_d2i_bio_of(TS_REQ, TS_REQ_new, d2i_TS_REQ, bp, a); 240 return ASN1_item_d2i_bio(&TS_REQ_it, bp, a);
243} 241}
244 242
245int 243int
246i2d_TS_REQ_bio(BIO *bp, TS_REQ *a) 244i2d_TS_REQ_bio(BIO *bp, TS_REQ *a)
247{ 245{
248 return ASN1_i2d_bio_of_const(TS_REQ, i2d_TS_REQ, bp, a); 246 return ASN1_item_i2d_bio(&TS_REQ_it, bp, a);
249} 247}
250#endif 248#endif
251 249
252TS_REQ * 250TS_REQ *
253d2i_TS_REQ_fp(FILE *fp, TS_REQ **a) 251d2i_TS_REQ_fp(FILE *fp, TS_REQ **a)
254{ 252{
255 return ASN1_d2i_fp_of(TS_REQ, TS_REQ_new, d2i_TS_REQ, fp, a); 253 return ASN1_item_d2i_fp(&TS_REQ_it, fp, a);
256} 254}
257 255
258int 256int
259i2d_TS_REQ_fp(FILE *fp, TS_REQ *a) 257i2d_TS_REQ_fp(FILE *fp, TS_REQ *a)
260{ 258{
261 return ASN1_i2d_fp_of_const(TS_REQ, i2d_TS_REQ, fp, a); 259 return ASN1_item_i2d_fp(&TS_REQ_it, fp, a);
262} 260}
263 261
264static const ASN1_TEMPLATE TS_ACCURACY_seq_tt[] = { 262static const ASN1_TEMPLATE TS_ACCURACY_seq_tt[] = {
@@ -446,28 +444,26 @@ TS_TST_INFO_dup(TS_TST_INFO *x)
446TS_TST_INFO * 444TS_TST_INFO *
447d2i_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO **a) 445d2i_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO **a)
448{ 446{
449 return ASN1_d2i_bio_of(TS_TST_INFO, TS_TST_INFO_new, d2i_TS_TST_INFO, 447 return ASN1_item_d2i_bio(&TS_TST_INFO_it, bp, a);
450 bp, a);
451} 448}
452 449
453int 450int
454i2d_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO *a) 451i2d_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO *a)
455{ 452{
456 return ASN1_i2d_bio_of_const(TS_TST_INFO, i2d_TS_TST_INFO, bp, a); 453 return ASN1_item_i2d_bio(&TS_TST_INFO_it, bp, a);
457} 454}
458#endif 455#endif
459 456
460TS_TST_INFO * 457TS_TST_INFO *
461d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a) 458d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a)
462{ 459{
463 return ASN1_d2i_fp_of(TS_TST_INFO, TS_TST_INFO_new, d2i_TS_TST_INFO, 460 return ASN1_item_d2i_fp(&TS_TST_INFO_it, fp, a);
464 fp, a);
465} 461}
466 462
467int 463int
468i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a) 464i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a)
469{ 465{
470 return ASN1_i2d_fp_of_const(TS_TST_INFO, i2d_TS_TST_INFO, fp, a); 466 return ASN1_item_i2d_fp(&TS_TST_INFO_it, fp, a);
471} 467}
472 468
473static const ASN1_TEMPLATE TS_STATUS_INFO_seq_tt[] = { 469static const ASN1_TEMPLATE TS_STATUS_INFO_seq_tt[] = {
@@ -652,26 +648,26 @@ TS_RESP_dup(TS_RESP *x)
652TS_RESP * 648TS_RESP *
653d2i_TS_RESP_bio(BIO *bp, TS_RESP **a) 649d2i_TS_RESP_bio(BIO *bp, TS_RESP **a)
654{ 650{
655 return ASN1_d2i_bio_of(TS_RESP, TS_RESP_new, d2i_TS_RESP, bp, a); 651 return ASN1_item_d2i_bio(&TS_RESP_it, bp, a);
656} 652}
657 653
658int 654int
659i2d_TS_RESP_bio(BIO *bp, TS_RESP *a) 655i2d_TS_RESP_bio(BIO *bp, TS_RESP *a)
660{ 656{
661 return ASN1_i2d_bio_of_const(TS_RESP, i2d_TS_RESP, bp, a); 657 return ASN1_item_i2d_bio(&TS_RESP_it, bp, a);
662} 658}
663#endif 659#endif
664 660
665TS_RESP * 661TS_RESP *
666d2i_TS_RESP_fp(FILE *fp, TS_RESP **a) 662d2i_TS_RESP_fp(FILE *fp, TS_RESP **a)
667{ 663{
668 return ASN1_d2i_fp_of(TS_RESP, TS_RESP_new, d2i_TS_RESP, fp, a); 664 return ASN1_item_d2i_fp(&TS_RESP_it, fp, a);
669} 665}
670 666
671int 667int
672i2d_TS_RESP_fp(FILE *fp, TS_RESP *a) 668i2d_TS_RESP_fp(FILE *fp, TS_RESP *a)
673{ 669{
674 return ASN1_i2d_fp_of_const(TS_RESP, i2d_TS_RESP, fp, a); 670 return ASN1_item_i2d_fp(&TS_RESP_it, fp, a);
675} 671}
676 672
677static const ASN1_TEMPLATE ESS_ISSUER_SERIAL_seq_tt[] = { 673static const ASN1_TEMPLATE ESS_ISSUER_SERIAL_seq_tt[] = {