summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2016-12-30 16:04:34 +0000
committerjsing <>2016-12-30 16:04:34 +0000
commit47579588b6c174b33e3944f2a8ba900dcd98d094 (patch)
tree34842e63ec795229662a2d7c2198ea7475948686 /src/lib
parent3303a656e2ced0a0075ed9068205a36a16a4045c (diff)
downloadopenbsd-47579588b6c174b33e3944f2a8ba900dcd98d094.tar.gz
openbsd-47579588b6c174b33e3944f2a8ba900dcd98d094.tar.bz2
openbsd-47579588b6c174b33e3944f2a8ba900dcd98d094.zip
Expand ASN1_ITEM_rptr and ASN1_ITEM_ptr macros - no change in generated
assembly.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/asn1/p5_pbe.c4
-rw-r--r--src/lib/libcrypto/asn1/p5_pbev2.c6
-rw-r--r--src/lib/libcrypto/asn1/tasn_dec.c10
-rw-r--r--src/lib/libcrypto/asn1/tasn_enc.c12
-rw-r--r--src/lib/libcrypto/asn1/tasn_fre.c6
-rw-r--r--src/lib/libcrypto/asn1/tasn_new.c6
-rw-r--r--src/lib/libcrypto/asn1/tasn_prn.c8
-rw-r--r--src/lib/libcrypto/asn1/x_crl.c4
-rw-r--r--src/lib/libcrypto/asn1/x_name.c10
9 files changed, 33 insertions, 33 deletions
diff --git a/src/lib/libcrypto/asn1/p5_pbe.c b/src/lib/libcrypto/asn1/p5_pbe.c
index 3e7057bb24..e0609e02e9 100644
--- a/src/lib/libcrypto/asn1/p5_pbe.c
+++ b/src/lib/libcrypto/asn1/p5_pbe.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p5_pbe.c,v 1.20 2015/02/11 04:00:39 jsing Exp $ */ 1/* $OpenBSD: p5_pbe.c,v 1.21 2016/12/30 16:04:34 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 1999. 3 * project 1999.
4 */ 4 */
@@ -148,7 +148,7 @@ PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
148 else 148 else
149 arc4random_buf(sstr, saltlen); 149 arc4random_buf(sstr, saltlen);
150 150
151 if (!ASN1_item_pack(pbe, ASN1_ITEM_rptr(PBEPARAM), &pbe_str)) { 151 if (!ASN1_item_pack(pbe, &PBEPARAM_it, &pbe_str)) {
152 ASN1err(ASN1_F_PKCS5_PBE_SET0_ALGOR, ERR_R_MALLOC_FAILURE); 152 ASN1err(ASN1_F_PKCS5_PBE_SET0_ALGOR, ERR_R_MALLOC_FAILURE);
153 goto err; 153 goto err;
154 } 154 }
diff --git a/src/lib/libcrypto/asn1/p5_pbev2.c b/src/lib/libcrypto/asn1/p5_pbev2.c
index 9be7e0205c..155e2b0b3e 100644
--- a/src/lib/libcrypto/asn1/p5_pbev2.c
+++ b/src/lib/libcrypto/asn1/p5_pbev2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p5_pbev2.c,v 1.23 2015/09/30 18:41:06 jsing Exp $ */ 1/* $OpenBSD: p5_pbev2.c,v 1.24 2016/12/30 16:04:34 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 1999-2004. 3 * project 1999-2004.
4 */ 4 */
@@ -265,7 +265,7 @@ PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter, unsigned char *salt,
265 265
266 /* Encode PBE2PARAM into parameter */ 266 /* Encode PBE2PARAM into parameter */
267 267
268 if (!ASN1_item_pack(pbe2, ASN1_ITEM_rptr(PBE2PARAM), 268 if (!ASN1_item_pack(pbe2, &PBE2PARAM_it,
269 &ret->parameter->value.sequence)) goto merr; 269 &ret->parameter->value.sequence)) goto merr;
270 ret->parameter->type = V_ASN1_SEQUENCE; 270 ret->parameter->type = V_ASN1_SEQUENCE;
271 271
@@ -358,7 +358,7 @@ PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, int prf_nid,
358 if (!(keyfunc->parameter = ASN1_TYPE_new())) 358 if (!(keyfunc->parameter = ASN1_TYPE_new()))
359 goto merr; 359 goto merr;
360 360
361 if (!ASN1_item_pack(kdf, ASN1_ITEM_rptr(PBKDF2PARAM), 361 if (!ASN1_item_pack(kdf, &PBKDF2PARAM_it,
362 &keyfunc->parameter->value.sequence)) 362 &keyfunc->parameter->value.sequence))
363 goto merr; 363 goto merr;
364 keyfunc->parameter->type = V_ASN1_SEQUENCE; 364 keyfunc->parameter->type = V_ASN1_SEQUENCE;
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c
index e75fe53633..de78164995 100644
--- a/src/lib/libcrypto/asn1/tasn_dec.c
+++ b/src/lib/libcrypto/asn1/tasn_dec.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_dec.c,v 1.32 2016/05/04 15:00:24 tedu Exp $ */ 1/* $OpenBSD: tasn_dec.c,v 1.33 2016/12/30 16:04:34 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 */
@@ -589,7 +589,7 @@ asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len,
589 while (sk_ASN1_VALUE_num(sktmp) > 0) { 589 while (sk_ASN1_VALUE_num(sktmp) > 0) {
590 vtmp = sk_ASN1_VALUE_pop(sktmp); 590 vtmp = sk_ASN1_VALUE_pop(sktmp);
591 ASN1_item_ex_free(&vtmp, 591 ASN1_item_ex_free(&vtmp,
592 ASN1_ITEM_ptr(tt->item)); 592 tt->item);
593 } 593 }
594 } 594 }
595 595
@@ -616,7 +616,7 @@ asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len,
616 } 616 }
617 skfield = NULL; 617 skfield = NULL;
618 if (!ASN1_item_ex_d2i(&skfield, &p, len, 618 if (!ASN1_item_ex_d2i(&skfield, &p, len,
619 ASN1_ITEM_ptr(tt->item), -1, 0, 0, ctx)) { 619 tt->item, -1, 0, 0, ctx)) {
620 ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, 620 ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
621 ERR_R_NESTED_ASN1_ERROR); 621 ERR_R_NESTED_ASN1_ERROR);
622 goto err; 622 goto err;
@@ -637,7 +637,7 @@ asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len,
637 } else if (flags & ASN1_TFLG_IMPTAG) { 637 } else if (flags & ASN1_TFLG_IMPTAG) {
638 /* IMPLICIT tagging */ 638 /* IMPLICIT tagging */
639 ret = ASN1_item_ex_d2i(val, &p, len, 639 ret = ASN1_item_ex_d2i(val, &p, len,
640 ASN1_ITEM_ptr(tt->item), tt->tag, aclass, opt, ctx); 640 tt->item, tt->tag, aclass, opt, ctx);
641 if (!ret) { 641 if (!ret) {
642 ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, 642 ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
643 ERR_R_NESTED_ASN1_ERROR); 643 ERR_R_NESTED_ASN1_ERROR);
@@ -646,7 +646,7 @@ asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, long len,
646 return -1; 646 return -1;
647 } else { 647 } else {
648 /* Nothing special */ 648 /* Nothing special */
649 ret = ASN1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item), 649 ret = ASN1_item_ex_d2i(val, &p, len, tt->item,
650 -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx); 650 -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx);
651 if (!ret) { 651 if (!ret) {
652 ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, 652 ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I,
diff --git a/src/lib/libcrypto/asn1/tasn_enc.c b/src/lib/libcrypto/asn1/tasn_enc.c
index 7d90c68c85..f3341901fe 100644
--- a/src/lib/libcrypto/asn1/tasn_enc.c
+++ b/src/lib/libcrypto/asn1/tasn_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_enc.c,v 1.20 2016/05/04 15:00:24 tedu Exp $ */ 1/* $OpenBSD: tasn_enc.c,v 1.21 2016/12/30 16:04:34 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 */
@@ -330,7 +330,7 @@ asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
330 for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) { 330 for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
331 skitem = sk_ASN1_VALUE_value(sk, i); 331 skitem = sk_ASN1_VALUE_value(sk, i);
332 skcontlen += ASN1_item_ex_i2d(&skitem, NULL, 332 skcontlen += ASN1_item_ex_i2d(&skitem, NULL,
333 ASN1_ITEM_ptr(tt->item), -1, iclass); 333 tt->item, -1, iclass);
334 } 334 }
335 sklen = ASN1_object_size(ndef, skcontlen, sktag); 335 sklen = ASN1_object_size(ndef, skcontlen, sktag);
336 /* If EXPLICIT need length of surrounding tag */ 336 /* If EXPLICIT need length of surrounding tag */
@@ -349,7 +349,7 @@ asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
349 /* SET or SEQUENCE and IMPLICIT tag */ 349 /* SET or SEQUENCE and IMPLICIT tag */
350 ASN1_put_object(out, ndef, skcontlen, sktag, skaclass); 350 ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);
351 /* And the stuff itself */ 351 /* And the stuff itself */
352 asn1_set_seq_out(sk, out, skcontlen, ASN1_ITEM_ptr(tt->item), 352 asn1_set_seq_out(sk, out, skcontlen, tt->item,
353 isset, iclass); 353 isset, iclass);
354 if (ndef == 2) { 354 if (ndef == 2) {
355 ASN1_put_eoc(out); 355 ASN1_put_eoc(out);
@@ -363,7 +363,7 @@ asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
363 if (flags & ASN1_TFLG_EXPTAG) { 363 if (flags & ASN1_TFLG_EXPTAG) {
364 /* EXPLICIT tagging */ 364 /* EXPLICIT tagging */
365 /* Find length of tagged item */ 365 /* Find length of tagged item */
366 i = ASN1_item_ex_i2d(pval, NULL, ASN1_ITEM_ptr(tt->item), 366 i = ASN1_item_ex_i2d(pval, NULL, tt->item,
367 -1, iclass); 367 -1, iclass);
368 if (!i) 368 if (!i)
369 return 0; 369 return 0;
@@ -372,7 +372,7 @@ asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
372 if (out) { 372 if (out) {
373 /* Output tag and item */ 373 /* Output tag and item */
374 ASN1_put_object(out, ndef, i, ttag, tclass); 374 ASN1_put_object(out, ndef, i, ttag, tclass);
375 ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), 375 ASN1_item_ex_i2d(pval, out, tt->item,
376 -1, iclass); 376 -1, iclass);
377 if (ndef == 2) 377 if (ndef == 2)
378 ASN1_put_eoc(out); 378 ASN1_put_eoc(out);
@@ -381,7 +381,7 @@ asn1_template_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
381 } 381 }
382 382
383 /* Either normal or IMPLICIT tagging: combine class and flags */ 383 /* Either normal or IMPLICIT tagging: combine class and flags */
384 return ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), 384 return ASN1_item_ex_i2d(pval, out, tt->item,
385 ttag, tclass | iclass); 385 ttag, tclass | iclass);
386} 386}
387 387
diff --git a/src/lib/libcrypto/asn1/tasn_fre.c b/src/lib/libcrypto/asn1/tasn_fre.c
index 30d68786b1..9276034808 100644
--- a/src/lib/libcrypto/asn1/tasn_fre.c
+++ b/src/lib/libcrypto/asn1/tasn_fre.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_fre.c,v 1.14 2015/02/14 15:23:57 miod Exp $ */ 1/* $OpenBSD: tasn_fre.c,v 1.15 2016/12/30 16:04:34 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 */
@@ -176,13 +176,13 @@ ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
176 for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) { 176 for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
177 ASN1_VALUE *vtmp; 177 ASN1_VALUE *vtmp;
178 vtmp = sk_ASN1_VALUE_value(sk, i); 178 vtmp = sk_ASN1_VALUE_value(sk, i);
179 asn1_item_combine_free(&vtmp, ASN1_ITEM_ptr(tt->item), 179 asn1_item_combine_free(&vtmp, tt->item,
180 0); 180 0);
181 } 181 }
182 sk_ASN1_VALUE_free(sk); 182 sk_ASN1_VALUE_free(sk);
183 *pval = NULL; 183 *pval = NULL;
184 } else 184 } else
185 asn1_item_combine_free(pval, ASN1_ITEM_ptr(tt->item), 185 asn1_item_combine_free(pval, tt->item,
186 tt->flags & ASN1_TFLG_COMBINE); 186 tt->flags & ASN1_TFLG_COMBINE);
187} 187}
188 188
diff --git a/src/lib/libcrypto/asn1/tasn_new.c b/src/lib/libcrypto/asn1/tasn_new.c
index 986e5811b6..491de0131e 100644
--- a/src/lib/libcrypto/asn1/tasn_new.c
+++ b/src/lib/libcrypto/asn1/tasn_new.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_new.c,v 1.15 2015/07/20 15:43:23 miod Exp $ */ 1/* $OpenBSD: tasn_new.c,v 1.16 2016/12/30 16:04:34 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 */
@@ -244,7 +244,7 @@ asn1_item_clear(ASN1_VALUE **pval, const ASN1_ITEM *it)
244int 244int
245ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt) 245ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
246{ 246{
247 const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item); 247 const ASN1_ITEM *it = tt->item;
248 int ret; 248 int ret;
249 249
250 if (tt->flags & ASN1_TFLG_OPTIONAL) { 250 if (tt->flags & ASN1_TFLG_OPTIONAL) {
@@ -291,7 +291,7 @@ asn1_template_clear(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt)
291 if (tt->flags & (ASN1_TFLG_ADB_MASK|ASN1_TFLG_SK_MASK)) 291 if (tt->flags & (ASN1_TFLG_ADB_MASK|ASN1_TFLG_SK_MASK))
292 *pval = NULL; 292 *pval = NULL;
293 else 293 else
294 asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item)); 294 asn1_item_clear(pval, tt->item);
295} 295}
296 296
297 297
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c
index c8601a1a89..80e7fbb890 100644
--- a/src/lib/libcrypto/asn1/tasn_prn.c
+++ b/src/lib/libcrypto/asn1/tasn_prn.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tasn_prn.c,v 1.14 2015/12/23 01:50:26 mmcc Exp $ */ 1/* $OpenBSD: tasn_prn.c,v 1.15 2016/12/30 16:04:34 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 */
@@ -339,7 +339,7 @@ asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
339 339
340 flags = tt->flags; 340 flags = tt->flags;
341 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME) 341 if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME)
342 sname = ASN1_ITEM_ptr(tt->item)->sname; 342 sname = tt->item->sname;
343 else 343 else
344 sname = NULL; 344 sname = NULL;
345 if (pctx->flags & ASN1_PCTX_FLAGS_NO_FIELD_NAME) 345 if (pctx->flags & ASN1_PCTX_FLAGS_NO_FIELD_NAME)
@@ -371,7 +371,7 @@ asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
371 return 0; 371 return 0;
372 skitem = sk_ASN1_VALUE_value(stack, i); 372 skitem = sk_ASN1_VALUE_value(stack, i);
373 if (!asn1_item_print_ctx(out, &skitem, indent + 2, 373 if (!asn1_item_print_ctx(out, &skitem, indent + 2,
374 ASN1_ITEM_ptr(tt->item), NULL, NULL, 1, pctx)) 374 tt->item, NULL, NULL, 1, pctx))
375 return 0; 375 return 0;
376 } 376 }
377 if (!i && BIO_printf(out, "%*s<EMPTY>\n", indent + 2, "") <= 0) 377 if (!i && BIO_printf(out, "%*s<EMPTY>\n", indent + 2, "") <= 0)
@@ -382,7 +382,7 @@ asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
382 } 382 }
383 return 1; 383 return 1;
384 } 384 }
385 return asn1_item_print_ctx(out, fld, indent, ASN1_ITEM_ptr(tt->item), 385 return asn1_item_print_ctx(out, fld, indent, tt->item,
386 fname, sname, 0, pctx); 386 fname, sname, 0, pctx);
387} 387}
388 388
diff --git a/src/lib/libcrypto/asn1/x_crl.c b/src/lib/libcrypto/asn1/x_crl.c
index 6062587ed4..eeff341d7d 100644
--- a/src/lib/libcrypto/asn1/x_crl.c
+++ b/src/lib/libcrypto/asn1/x_crl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_crl.c,v 1.25 2015/07/20 15:29:13 miod Exp $ */ 1/* $OpenBSD: x_crl.c,v 1.26 2016/12/30 16:04:34 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 *
@@ -571,7 +571,7 @@ X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x)
571static int 571static int
572def_crl_verify(X509_CRL *crl, EVP_PKEY *r) 572def_crl_verify(X509_CRL *crl, EVP_PKEY *r)
573{ 573{
574 return(ASN1_item_verify(ASN1_ITEM_rptr(X509_CRL_INFO), 574 return(ASN1_item_verify(&X509_CRL_INFO_it,
575 crl->sig_alg, crl->signature, crl->crl, r)); 575 crl->sig_alg, crl->signature, crl->crl, r));
576} 576}
577 577
diff --git a/src/lib/libcrypto/asn1/x_name.c b/src/lib/libcrypto/asn1/x_name.c
index be936318d8..87bcc2c5ba 100644
--- a/src/lib/libcrypto/asn1/x_name.c
+++ b/src/lib/libcrypto/asn1/x_name.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_name.c,v 1.31 2015/07/24 15:09:52 jsing Exp $ */ 1/* $OpenBSD: x_name.c,v 1.32 2016/12/30 16:04:34 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 *
@@ -302,7 +302,7 @@ x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len,
302 302
303 /* Get internal representation of Name */ 303 /* Get internal representation of Name */
304 ret = ASN1_item_ex_d2i(&intname.a, &p, len, 304 ret = ASN1_item_ex_d2i(&intname.a, &p, len,
305 ASN1_ITEM_rptr(X509_NAME_INTERNAL), tag, aclass, opt, ctx); 305 &X509_NAME_INTERNAL_it, tag, aclass, opt, ctx);
306 306
307 if (ret <= 0) 307 if (ret <= 0)
308 return ret; 308 return ret;
@@ -410,11 +410,11 @@ x509_name_encode(X509_NAME *a)
410 goto memerr; 410 goto memerr;
411 } 411 }
412 len = ASN1_item_ex_i2d(&intname.a, NULL, 412 len = ASN1_item_ex_i2d(&intname.a, NULL,
413 ASN1_ITEM_rptr(X509_NAME_INTERNAL), -1, -1); 413 &X509_NAME_INTERNAL_it, -1, -1);
414 if (!BUF_MEM_grow(a->bytes, len)) 414 if (!BUF_MEM_grow(a->bytes, len))
415 goto memerr; 415 goto memerr;
416 p = (unsigned char *)a->bytes->data; 416 p = (unsigned char *)a->bytes->data;
417 ASN1_item_ex_i2d(&intname.a, &p, ASN1_ITEM_rptr(X509_NAME_INTERNAL), 417 ASN1_item_ex_i2d(&intname.a, &p, &X509_NAME_INTERNAL_it,
418 -1, -1); 418 -1, -1);
419 sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s, 419 sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,
420 local_sk_X509_NAME_ENTRY_free); 420 local_sk_X509_NAME_ENTRY_free);
@@ -615,7 +615,7 @@ i2d_name_canon(STACK_OF(STACK_OF_X509_NAME_ENTRY) *_intname, unsigned char **in)
615 for (i = 0; i < sk_ASN1_VALUE_num(intname); i++) { 615 for (i = 0; i < sk_ASN1_VALUE_num(intname); i++) {
616 v = sk_ASN1_VALUE_value(intname, i); 616 v = sk_ASN1_VALUE_value(intname, i);
617 ltmp = ASN1_item_ex_i2d(&v, in, 617 ltmp = ASN1_item_ex_i2d(&v, in,
618 ASN1_ITEM_rptr(X509_NAME_ENTRIES), -1, -1); 618 &X509_NAME_ENTRIES_it, -1, -1);
619 if (ltmp < 0) 619 if (ltmp < 0)
620 return ltmp; 620 return ltmp;
621 len += ltmp; 621 len += ltmp;