summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/t_req.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/t_req.c')
-rw-r--r--src/lib/libcrypto/asn1/t_req.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/lib/libcrypto/asn1/t_req.c b/src/lib/libcrypto/asn1/t_req.c
index cc9da46439..4b27a4ddbe 100644
--- a/src/lib/libcrypto/asn1/t_req.c
+++ b/src/lib/libcrypto/asn1/t_req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t_req.c,v 1.21 2021/12/25 13:17:48 jsing Exp $ */ 1/* $OpenBSD: t_req.c,v 1.22 2022/05/09 19:19:33 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 *
@@ -176,7 +176,6 @@ X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
176 ASN1_TYPE *at; 176 ASN1_TYPE *at;
177 X509_ATTRIBUTE *a; 177 X509_ATTRIBUTE *a;
178 ASN1_BIT_STRING *bs = NULL; 178 ASN1_BIT_STRING *bs = NULL;
179 ASN1_TYPE *t;
180 int j, type = 0, count = 1, ii = 0; 179 int j, type = 0, count = 1, ii = 0;
181 180
182 a = sk_X509_ATTRIBUTE_value(sk, i); 181 a = sk_X509_ATTRIBUTE_value(sk, i);
@@ -186,20 +185,12 @@ X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
186 if (BIO_printf(bp, "%12s", "") <= 0) 185 if (BIO_printf(bp, "%12s", "") <= 0)
187 goto err; 186 goto err;
188 if ((j = i2a_ASN1_OBJECT(bp, a->object)) > 0) { 187 if ((j = i2a_ASN1_OBJECT(bp, a->object)) > 0) {
189 if (a->single) { 188 ii = 0;
190 t = a->value.single; 189 count = sk_ASN1_TYPE_num(a->set);
191 type = t->type;
192 bs = t->value.bit_string;
193 } else {
194 ii = 0;
195 count = sk_ASN1_TYPE_num(
196 a->value.set);
197 get_next: 190 get_next:
198 at = sk_ASN1_TYPE_value( 191 at = sk_ASN1_TYPE_value(a->set, ii);
199 a->value.set, ii); 192 type = at->type;
200 type = at->type; 193 bs = at->value.asn1_string;
201 bs = at->value.asn1_string;
202 }
203 } 194 }
204 for (j = 25 - j; j > 0; j--) 195 for (j = 25 - j; j > 0; j--)
205 if (BIO_write(bp, " ", 1) != 1) 196 if (BIO_write(bp, " ", 1) != 1)