Lines Matching defs:bp

100 int X509_print(BIO *bp, X509 *x)
102 return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
105 int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
127 if (BIO_write(bp, "Certificate:\n", 13) <= 0)
129 if (BIO_write(bp, " Data:\n", 10) <= 0)
134 if (BIO_printf(bp, "%8sVersion: %lu (0x%lx)\n", "", l + 1, l) <= 0)
139 if (BIO_write(bp, " Serial Number:", 22) <= 0)
151 if (BIO_printf(bp, " %s%lu (%s0x%lx)\n", neg, l, neg, l) <= 0)
155 if (BIO_printf(bp, "\n%12s%s", "", neg) <= 0)
159 if (BIO_printf(bp, "%02x%c", bs->data[i],
168 if (X509_signature_print(bp, ci->signature, NULL) <= 0)
171 if (BIO_printf(bp, "%8sSignature Algorithm: ", "") <= 0)
173 if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0)
175 if (BIO_puts(bp, "\n") <= 0)
181 if (BIO_printf(bp, " Issuer:%c", mlch) <= 0)
183 if (X509_NAME_print_ex(bp, X509_get_issuer_name(x), nmindent, nmflags)
186 if (BIO_write(bp, "\n", 1) <= 0)
190 if (BIO_write(bp, " Validity\n", 17) <= 0)
192 if (BIO_write(bp, " Not Before: ", 24) <= 0)
194 if (!ASN1_TIME_print(bp, X509_get_notBefore(x)))
196 if (BIO_write(bp, "\n Not After : ", 25) <= 0)
198 if (!ASN1_TIME_print(bp, X509_get_notAfter(x)))
200 if (BIO_write(bp, "\n", 1) <= 0)
204 if (BIO_printf(bp, " Subject:%c", mlch) <= 0)
207 (bp, X509_get_subject_name(x), nmindent, nmflags) < 0)
209 if (BIO_write(bp, "\n", 1) <= 0)
213 if (BIO_write(bp, " Subject Public Key Info:\n", 33) <= 0)
215 if (BIO_printf(bp, "%12sPublic Key Algorithm: ", "") <= 0)
217 if (i2a_ASN1_OBJECT(bp, ci->key->algor->algorithm) <= 0)
219 if (BIO_puts(bp, "\n") <= 0)
224 BIO_printf(bp, "%12sUnable to load Public Key\n", "");
225 ERR_print_errors(bp);
227 EVP_PKEY_print_public(bp, pkey, 16, NULL);
234 if (BIO_printf(bp, "%8sIssuer Unique ID: ", "") <= 0)
236 if (!X509_signature_dump(bp, ci->issuerUID, 12))
240 if (BIO_printf(bp, "%8sSubject Unique ID: ", "") <= 0)
242 if (!X509_signature_dump(bp, ci->subjectUID, 12))
248 X509V3_extensions_print(bp, "X509v3 extensions",
252 if (X509_signature_print(bp, x->sig_alg, x->signature) <= 0)
256 if (!X509_CERT_AUX_print(bp, x->aux, 0))
266 int X509_ocspid_print(BIO *bp, X509 *x)
277 if (BIO_printf(bp, " Subject OCSP hash: ") <= 0)
287 if (BIO_printf(bp, "%02X", SHA1md[i]) <= 0)
296 if (BIO_printf(bp, "\n Public key OCSP hash: ") <= 0)
304 if (BIO_printf(bp, "%02X", SHA1md[i]) <= 0)
307 BIO_printf(bp, "\n");
316 int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent)
325 if (BIO_write(bp, "\n", 1) <= 0)
327 if (BIO_indent(bp, indent, indent) <= 0)
330 if (BIO_printf(bp, "%02x%s", s[i], ((i + 1) == n) ? "" : ":") <= 0)
333 if (BIO_write(bp, "\n", 1) != 1)
339 int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
342 if (BIO_puts(bp, " Signature Algorithm: ") <= 0)
344 if (i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0)
354 return ameth->sig_print(bp, sigalg, sig, 9, 0);
358 return X509_signature_dump(bp, sig, 9);
359 else if (BIO_puts(bp, "\n") <= 0)
364 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v)
382 if (BIO_write(bp, buf, n) <= 0)
388 if (BIO_write(bp, buf, n) <= 0)
393 int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm)
396 return ASN1_UTCTIME_print(bp, tm);
398 return ASN1_GENERALIZEDTIME_print(bp, tm);
399 BIO_write(bp, "Bad time value", 14);
408 int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)
449 if (BIO_printf(bp, "%s %2d %02d:%02d:%02d%.*s %d%s",
456 BIO_write(bp, "Bad time value", 14);
460 int ASN1_UTCTIME_print(BIO *bp, const ASN1_UTCTIME *tm)
490 if (BIO_printf(bp, "%s %2d %02d:%02d:%02d %d%s",
497 BIO_write(bp, "Bad time value", 14);
501 int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
534 if (BIO_write(bp, c, i) != i)
538 if (BIO_write(bp, ", ", 2) != 2)