summaryrefslogtreecommitdiff
path: root/src/lib
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
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')
-rw-r--r--src/lib/libcrypto/dh/dh.h12
-rw-r--r--src/lib/libcrypto/dh/dh_asn1.c26
-rw-r--r--src/lib/libcrypto/dsa/dsa.h13
-rw-r--r--src/lib/libcrypto/dsa/dsa_asn1.c26
-rw-r--r--src/lib/libcrypto/ocsp/ocsp.h18
-rw-r--r--src/lib/libcrypto/ocsp/ocsp_asn.c27
-rw-r--r--src/lib/libcrypto/ts/ts_asn1.c38
7 files changed, 107 insertions, 53 deletions
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h
index 631cd5c685..920af3b92d 100644
--- a/src/lib/libcrypto/dh/dh.h
+++ b/src/lib/libcrypto/dh/dh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.h,v 1.17 2016/06/30 02:02:06 bcook Exp $ */ 1/* $OpenBSD: dh.h,v 1.18 2016/11/04 18:35:30 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -165,12 +165,10 @@ struct dh_st
165 this for backward compatibility: */ 165 this for backward compatibility: */
166#define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME 166#define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME
167 167
168#define d2i_DHparams_fp(fp,x) (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ 168DH *d2i_DHparams_bio(BIO *bp, DH **a);
169 (char *(*)())d2i_DHparams,(fp),(unsigned char **)(x)) 169int i2d_DHparams_bio(BIO *bp, DH *a);
170#define i2d_DHparams_fp(fp,x) ASN1_i2d_fp(i2d_DHparams,(fp), \ 170DH *d2i_DHparams_fp(FILE *fp, DH **a);
171 (unsigned char *)(x)) 171int i2d_DHparams_fp(FILE *fp, DH *a);
172#define d2i_DHparams_bio(bp,x) ASN1_d2i_bio_of(DH,DH_new,d2i_DHparams,bp,x)
173#define i2d_DHparams_bio(bp,x) ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x)
174 172
175DH *DHparams_dup(DH *); 173DH *DHparams_dup(DH *);
176 174
diff --git a/src/lib/libcrypto/dh/dh_asn1.c b/src/lib/libcrypto/dh/dh_asn1.c
index 7060130ed8..d7fd4f7d88 100644
--- a/src/lib/libcrypto/dh/dh_asn1.c
+++ b/src/lib/libcrypto/dh/dh_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_asn1.c,v 1.8 2015/02/14 15:06:55 jsing Exp $ */ 1/* $OpenBSD: dh_asn1.c,v 1.9 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 */
@@ -137,6 +137,30 @@ i2d_DHparams(const DH *a, unsigned char **out)
137} 137}
138 138
139DH * 139DH *
140d2i_DHparams_bio(BIO *bp, DH **a)
141{
142 return ASN1_item_d2i_bio(&DHparams_it, bp, a);
143}
144
145int
146i2d_DHparams_bio(BIO *bp, DH *a)
147{
148 return ASN1_item_i2d_bio(&DHparams_it, bp, a);
149}
150
151DH *
152d2i_DHparams_fp(FILE *fp, DH **a)
153{
154 return ASN1_item_d2i_fp(&DHparams_it, fp, a);
155}
156
157int
158i2d_DHparams_fp(FILE *fp, DH *a)
159{
160 return ASN1_item_i2d_fp(&DHparams_it, fp, a);
161}
162
163DH *
140DHparams_dup(DH *dh) 164DHparams_dup(DH *dh)
141{ 165{
142 return ASN1_item_dup(ASN1_ITEM_rptr(DHparams), dh); 166 return ASN1_item_dup(ASN1_ITEM_rptr(DHparams), dh);
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h
index b4d7c1ff0f..6ddd4c35d5 100644
--- a/src/lib/libcrypto/dsa/dsa.h
+++ b/src/lib/libcrypto/dsa/dsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa.h,v 1.21 2016/06/30 02:02:06 bcook Exp $ */ 1/* $OpenBSD: dsa.h,v 1.22 2016/11/04 18:35:30 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -173,13 +173,10 @@ struct dsa_st
173 ENGINE *engine; 173 ENGINE *engine;
174 }; 174 };
175 175
176#define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \ 176DSA *d2i_DSAparams_bio(BIO *bp, DSA **a);
177 (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x)) 177int i2d_DSAparams_bio(BIO *bp, DSA *a);
178#define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \ 178DSA *d2i_DSAparams_fp(FILE *fp, DSA **a);
179 (unsigned char *)(x)) 179int i2d_DSAparams_fp(FILE *fp, DSA *a);
180#define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x)
181#define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x)
182
183 180
184DSA *DSAparams_dup(DSA *x); 181DSA *DSAparams_dup(DSA *x);
185DSA_SIG * DSA_SIG_new(void); 182DSA_SIG * DSA_SIG_new(void);
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
diff --git a/src/lib/libcrypto/ocsp/ocsp.h b/src/lib/libcrypto/ocsp/ocsp.h
index 90f0edf289..24592bc3cc 100644
--- a/src/lib/libcrypto/ocsp/ocsp.h
+++ b/src/lib/libcrypto/ocsp/ocsp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp.h,v 1.8 2016/09/04 17:18:18 jsing Exp $ */ 1/* $OpenBSD: ocsp.h,v 1.9 2016/11/04 18:35:30 jsing Exp $ */
2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL 2/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
3 * project. */ 3 * project. */
4 4
@@ -343,12 +343,6 @@ typedef struct ocsp_service_locator_st {
343#define PEM_STRING_OCSP_REQUEST "OCSP REQUEST" 343#define PEM_STRING_OCSP_REQUEST "OCSP REQUEST"
344#define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE" 344#define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE"
345 345
346#define d2i_OCSP_REQUEST_bio(bp,p) \
347 ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)
348
349#define d2i_OCSP_RESPONSE_bio(bp,p) \
350 ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p)
351
352#define PEM_read_bio_OCSP_REQUEST(bp,x,cb) \ 346#define PEM_read_bio_OCSP_REQUEST(bp,x,cb) \
353 (OCSP_REQUEST *)PEM_ASN1_read_bio((char *(*)())d2i_OCSP_REQUEST, \ 347 (OCSP_REQUEST *)PEM_ASN1_read_bio((char *(*)())d2i_OCSP_REQUEST, \
354 PEM_STRING_OCSP_REQUEST,bp,(char **)x,cb,NULL) 348 PEM_STRING_OCSP_REQUEST,bp,(char **)x,cb,NULL)
@@ -365,12 +359,6 @@ typedef struct ocsp_service_locator_st {
365 PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\ 359 PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\
366 bp,(char *)o, NULL,NULL,0,NULL,NULL) 360 bp,(char *)o, NULL,NULL,0,NULL,NULL)
367 361
368#define i2d_OCSP_RESPONSE_bio(bp,o) \
369 ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o)
370
371#define i2d_OCSP_REQUEST_bio(bp,o) \
372 ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o)
373
374#define OCSP_REQUEST_sign(o,pkey,md) \ 362#define OCSP_REQUEST_sign(o,pkey,md) \
375 ASN1_item_sign(ASN1_ITEM_rptr(OCSP_REQINFO), \ 363 ASN1_item_sign(ASN1_ITEM_rptr(OCSP_REQINFO), \
376 o->optionalSignature->signatureAlgorithm,NULL, \ 364 o->optionalSignature->signatureAlgorithm,NULL, \
@@ -560,6 +548,8 @@ OCSP_RESPONSE *OCSP_RESPONSE_new(void);
560void OCSP_RESPONSE_free(OCSP_RESPONSE *a); 548void OCSP_RESPONSE_free(OCSP_RESPONSE *a);
561OCSP_RESPONSE *d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len); 549OCSP_RESPONSE *d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len);
562int i2d_OCSP_RESPONSE(OCSP_RESPONSE *a, unsigned char **out); 550int i2d_OCSP_RESPONSE(OCSP_RESPONSE *a, unsigned char **out);
551OCSP_RESPONSE *d2i_OCSP_RESPONSE_bio(BIO *bp, OCSP_RESPONSE **a);
552int i2d_OCSP_RESPONSE_bio(BIO *bp, OCSP_RESPONSE *a);
563extern const ASN1_ITEM OCSP_RESPONSE_it; 553extern const ASN1_ITEM OCSP_RESPONSE_it;
564OCSP_RESPBYTES *OCSP_RESPBYTES_new(void); 554OCSP_RESPBYTES *OCSP_RESPBYTES_new(void);
565void OCSP_RESPBYTES_free(OCSP_RESPBYTES *a); 555void OCSP_RESPBYTES_free(OCSP_RESPBYTES *a);
@@ -580,6 +570,8 @@ OCSP_REQUEST *OCSP_REQUEST_new(void);
580void OCSP_REQUEST_free(OCSP_REQUEST *a); 570void OCSP_REQUEST_free(OCSP_REQUEST *a);
581OCSP_REQUEST *d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len); 571OCSP_REQUEST *d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len);
582int i2d_OCSP_REQUEST(OCSP_REQUEST *a, unsigned char **out); 572int i2d_OCSP_REQUEST(OCSP_REQUEST *a, unsigned char **out);
573OCSP_REQUEST *d2i_OCSP_REQUEST_bio(BIO *bp, OCSP_REQUEST **a);
574int i2d_OCSP_REQUEST_bio(BIO *bp, OCSP_REQUEST *a);
583extern const ASN1_ITEM OCSP_REQUEST_it; 575extern const ASN1_ITEM OCSP_REQUEST_it;
584OCSP_SIGNATURE *OCSP_SIGNATURE_new(void); 576OCSP_SIGNATURE *OCSP_SIGNATURE_new(void);
585void OCSP_SIGNATURE_free(OCSP_SIGNATURE *a); 577void OCSP_SIGNATURE_free(OCSP_SIGNATURE *a);
diff --git a/src/lib/libcrypto/ocsp/ocsp_asn.c b/src/lib/libcrypto/ocsp/ocsp_asn.c
index 72e7638c75..bb58ca79ab 100644
--- a/src/lib/libcrypto/ocsp/ocsp_asn.c
+++ b/src/lib/libcrypto/ocsp/ocsp_asn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp_asn.c,v 1.8 2015/07/25 14:52:47 jsing Exp $ */ 1/* $OpenBSD: ocsp_asn.c,v 1.9 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 */
@@ -333,7 +333,6 @@ const ASN1_ITEM OCSP_REQUEST_it = {
333 .sname = "OCSP_REQUEST", 333 .sname = "OCSP_REQUEST",
334}; 334};
335 335
336
337OCSP_REQUEST * 336OCSP_REQUEST *
338d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len) 337d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len)
339{ 338{
@@ -348,6 +347,18 @@ i2d_OCSP_REQUEST(OCSP_REQUEST *a, unsigned char **out)
348} 347}
349 348
350OCSP_REQUEST * 349OCSP_REQUEST *
350d2i_OCSP_REQUEST_bio(BIO *bp, OCSP_REQUEST **a)
351{
352 return ASN1_item_d2i_bio(&OCSP_REQUEST_it, bp, a);
353}
354
355int
356i2d_OCSP_REQUEST_bio(BIO *bp, OCSP_REQUEST *a)
357{
358 return ASN1_item_i2d_bio(&OCSP_REQUEST_it, bp, a);
359}
360
361OCSP_REQUEST *
351OCSP_REQUEST_new(void) 362OCSP_REQUEST_new(void)
352{ 363{
353 return (OCSP_REQUEST *)ASN1_item_new(&OCSP_REQUEST_it); 364 return (OCSP_REQUEST *)ASN1_item_new(&OCSP_REQUEST_it);
@@ -456,6 +467,18 @@ i2d_OCSP_RESPONSE(OCSP_RESPONSE *a, unsigned char **out)
456} 467}
457 468
458OCSP_RESPONSE * 469OCSP_RESPONSE *
470d2i_OCSP_RESPONSE_bio(BIO *bp, OCSP_RESPONSE **a)
471{
472 return ASN1_item_d2i_bio(&OCSP_RESPONSE_it, bp, a);
473}
474
475int
476i2d_OCSP_RESPONSE_bio(BIO *bp, OCSP_RESPONSE *a)
477{
478 return ASN1_item_i2d_bio(&OCSP_RESPONSE_it, bp, a);
479}
480
481OCSP_RESPONSE *
459OCSP_RESPONSE_new(void) 482OCSP_RESPONSE_new(void)
460{ 483{
461 return (OCSP_RESPONSE *)ASN1_item_new(&OCSP_RESPONSE_it); 484 return (OCSP_RESPONSE *)ASN1_item_new(&OCSP_RESPONSE_it);
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[] = {