Home | History | Annotate | Download | only in asn1

Lines Matching refs:bp

99 int X509_print(BIO *bp, X509 *x)
101 return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
104 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
126 if (BIO_write(bp,"Certificate:\n",13) <= 0) goto err;
127 if (BIO_write(bp," Data:\n",10) <= 0) goto err;
132 if (BIO_printf(bp,"%8sVersion: %lu (0x%lx)\n","",l+1,l) <= 0) goto err;
137 if (BIO_write(bp," Serial Number:",22) <= 0) goto err;
150 if (BIO_printf(bp," %s%lu (%s0x%lx)\n",neg,l,neg,l) <= 0)
156 if (BIO_printf(bp,"\n%12s%s","",neg) <= 0) goto err;
160 if (BIO_printf(bp,"%02x%c",bs->data[i],
170 if (BIO_printf(bp,"%8sSignature Algorithm: ","") <= 0)
172 if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0)
174 if (BIO_puts(bp, "\n") <= 0)
180 if (BIO_printf(bp," Issuer:%c",mlch) <= 0) goto err;
181 if (X509_NAME_print_ex(bp,X509_get_issuer_name(x),nmindent, nmflags) < 0) goto err;
182 if (BIO_write(bp,"\n",1) <= 0) goto err;
186 if (BIO_write(bp," Validity\n",17) <= 0) goto err;
187 if (BIO_write(bp," Not Before: ",24) <= 0) goto err;
188 if (!ASN1_TIME_print(bp,X509_get_notBefore(x))) goto err;
189 if (BIO_write(bp,"\n Not After : ",25) <= 0) goto err;
190 if (!ASN1_TIME_print(bp,X509_get_notAfter(x))) goto err;
191 if (BIO_write(bp,"\n",1) <= 0) goto err;
195 if (BIO_printf(bp," Subject:%c",mlch) <= 0) goto err;
196 if (X509_NAME_print_ex(bp,X509_get_subject_name(x),nmindent, nmflags) < 0) goto err;
197 if (BIO_write(bp,"\n",1) <= 0) goto err;
201 if (BIO_write(bp," Subject Public Key Info:\n",33) <= 0)
203 if (BIO_printf(bp,"%12sPublic Key Algorithm: ","") <= 0)
205 if (i2a_ASN1_OBJECT(bp, ci->key->algor->algorithm) <= 0)
207 if (BIO_puts(bp, "\n") <= 0)
213 BIO_printf(bp,"%12sUnable to load Public Key\n","");
214 ERR_print_errors(bp);
218 EVP_PKEY_print_public(bp, pkey, 16, NULL);
224 X509V3_extensions_print(bp, "X509v3 extensions",
229 if(X509_signature_print(bp, x->sig_alg, x->signature) <= 0) goto err;
233 if (!X509_CERT_AUX_print(bp, x->aux, 0)) goto err;
241 int X509_ocspid_print (BIO *bp, X509 *x)
251 if (BIO_printf(bp," Subject OCSP hash: ") <= 0)
261 if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0) goto err;
268 if (BIO_printf(bp,"\n Public key OCSP hash: ") <= 0)
275 if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0)
278 BIO_printf(bp,"\n");
286 int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
290 if (BIO_puts(bp," Signature Algorithm: ") <= 0) return 0;
291 if (i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0) return 0;
298 if (BIO_write(bp,"\n ",9) <= 0) return 0;
299 if (BIO_printf(bp,"%02x%s",s[i],
302 if (BIO_write(bp,"\n",1) != 1) return 0;
306 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v)
325 if (BIO_write(bp,buf,n) <= 0)
331 if (BIO_write(bp,buf,n) <= 0)
336 int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm)
338 if(tm->type == V_ASN1_UTCTIME) return ASN1_UTCTIME_print(bp, tm);
340 return ASN1_GENERALIZEDTIME_print(bp, tm);
341 BIO_write(bp,"Bad time value",14);
351 int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)
389 if (BIO_printf(bp,"%s %2d %02d:%02d:%02d%.*s %d%s",
395 BIO_write(bp,"Bad time value",14);
399 int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm)
425 if (BIO_printf(bp,"%s %2d %02d:%02d:%02d %d%s",
431 BIO_write(bp,"Bad time value",14);
435 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
472 if (BIO_write(bp,c,i) != i) goto err;
476 if (BIO_write(bp,", ",2) != 2) goto err;