pretty-print a PKCS#10 certification
X509_REQ *req, unsigned long
nameflags, unsigned long skipflags);
prints information contained in req to
bio in human-readable form. Printing is aborted as
soon as any operation fails, with the exception that failures while
attempting to decode or print the public key are not considered as
By default, the following blocks of information are printed in the following order. Each block can be skipped by setting the corresponding bit in skipflags, provided in parentheses after each block description.
- A pair of lines reading "Certificate Request:" and
"Data:" containing no information.
- The value contained in the version field in decimal and hexadecimal
- The subject name is printed with
- The public key algorithm is printed with
i2a_ASN1_OBJECT(3), and the public key returned from
- For each X.501 attribute that is not a requested extension according to
X509_REQ_extension_nid(3), the object identifier is printed
with i2a_ASN1_OBJECT(3), and all values of the types
V_ASN1_IA5STRINGare printed with BIO_write(3). (
- The requested extensions are retrieved with
X509_REQ_get_extensions(3) and their types and values are
X509V3_EXT_print(3), or, if the latter fails, with
- The signature is printed with
The nameflags argument modifies the format
for printing X.501 Name objects contained in
req. It is passed through to
X509_NAME_print_ex(3). If nameflags is
X509_FLAG_COMPAT, the indent
X509_NAME_print_ex(3) is set to 16 spaces and the traditional
SSLeay format generated by
X509_NAME_print(3) is used. Otherwise, if the only bit set in
is set to 12 spaces. Otherwise, indent is set to zero.
is a wrapper function setting the nameflags to
XN_FLAG_COMPAT and the
is similar to
X509_REQ_print() except that it prints
These functions return 1 if all requested information was successfully printed, even if failures occurred while attempting to decode or print the public key, or 0 if any operation fails.
BIO_new(3), X509_print_ex(3), X509_REQ_new(3)
X509_REQ_print() first appeared in SSLeay
X509_REQ_print_fp() in SSLeay 0.6.0. These
functions have been available since OpenBSD 2.4.
X509_REQ_print_ex() first appeared in
OpenSSL 0.9.7 and has been available since OpenBSD
Some printing failures are silently ignored while printing extensions, which may result in incomplete data being printed.