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.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/lib/libcrypto/asn1/t_req.c b/src/lib/libcrypto/asn1/t_req.c
index eca97e00cb..740cee80c0 100644
--- a/src/lib/libcrypto/asn1/t_req.c
+++ b/src/lib/libcrypto/asn1/t_req.c
@@ -91,7 +91,6 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long
91 EVP_PKEY *pkey; 91 EVP_PKEY *pkey;
92 STACK_OF(X509_ATTRIBUTE) *sk; 92 STACK_OF(X509_ATTRIBUTE) *sk;
93 STACK_OF(X509_EXTENSION) *exts; 93 STACK_OF(X509_EXTENSION) *exts;
94 char str[128];
95 char mlch = ' '; 94 char mlch = ' ';
96 int nmindent = 0; 95 int nmindent = 0;
97 96
@@ -116,9 +115,9 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long
116 l=0; 115 l=0;
117 for (i=0; i<ri->version->length; i++) 116 for (i=0; i<ri->version->length; i++)
118 { l<<=8; l+=ri->version->data[i]; } 117 { l<<=8; l+=ri->version->data[i]; }
119 snprintf(str,sizeof str,"%8sVersion: %s%lu (%s0x%lx)\n","",neg, 118 if(BIO_printf(bp,"%8sVersion: %s%lu (%s0x%lx)\n","",neg,l,neg,
120 l,neg,l); 119 l) <= 0)
121 if (BIO_puts(bp,str) <= 0) goto err; 120 goto err;
122 } 121 }
123 if(!(cflag & X509_FLAG_NO_SUBJECT)) 122 if(!(cflag & X509_FLAG_NO_SUBJECT))
124 { 123 {
@@ -169,14 +168,14 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long
169 if(!(cflag & X509_FLAG_NO_ATTRIBUTES)) 168 if(!(cflag & X509_FLAG_NO_ATTRIBUTES))
170 { 169 {
171 /* may not be */ 170 /* may not be */
172 snprintf(str,sizeof str,"%8sAttributes:\n",""); 171 if(BIO_printf(bp,"%8sAttributes:\n","") <= 0)
173 if (BIO_puts(bp,str) <= 0) goto err; 172 goto err;
174 173
175 sk=x->req_info->attributes; 174 sk=x->req_info->attributes;
176 if (sk_X509_ATTRIBUTE_num(sk) == 0) 175 if (sk_X509_ATTRIBUTE_num(sk) == 0)
177 { 176 {
178 snprintf(str,sizeof str,"%12sa0:00\n",""); 177 if(BIO_printf(bp,"%12sa0:00\n","") <= 0)
179 if (BIO_puts(bp,str) <= 0) goto err; 178 goto err;
180 } 179 }
181 else 180 else
182 { 181 {
@@ -191,8 +190,8 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long
191 a=sk_X509_ATTRIBUTE_value(sk,i); 190 a=sk_X509_ATTRIBUTE_value(sk,i);
192 if(X509_REQ_extension_nid(OBJ_obj2nid(a->object))) 191 if(X509_REQ_extension_nid(OBJ_obj2nid(a->object)))
193 continue; 192 continue;
194 snprintf(str,sizeof str,"%12s",""); 193 if(BIO_printf(bp,"%12s","") <= 0)
195 if (BIO_puts(bp,str) <= 0) goto err; 194 goto err;
196 if ((j=i2a_ASN1_OBJECT(bp,a->object)) > 0) 195 if ((j=i2a_ASN1_OBJECT(bp,a->object)) > 0)
197 { 196 {
198 if (a->single) 197 if (a->single)