X509_REQ_PRINT_EX(3)
πΈ X509_REQ_PRINT_EX(3) πΈ
okay bestie, this is the X509_REQ_PRINT_EX(3) page from the Library Functions Manual π
β¨ itβs giving βPKCS#10 request goes to the printer,β and honestly? iconic.
π NAME π
X509_REQ_print_ex, X509_REQ_print, X509_REQ_print_fp β pretty-print a PKCS#10 certification request π
β¨ SYNOPSIS β¨
int
X509_REQ_print_ex(BIO *bio, X509_REQ *req, unsigned long nameflags,
unsigned long skipflags);
int
X509_REQ_print(BIO *bio, X509_REQ *req);
int
X509_REQ_print_fp(FILE *fp, X509_REQ *req);
π DESCRIPTION π
okay so X509_REQ_print_ex() prints the information contained in req to bio in human-readable form β¨. Printing is aborted as soon as any operation fails β with one exception: failures while attempting to decode or print the public key are not considered as errors π.
By default, these blocks of information are printed in this order. Each block can be skipped by setting the corresponding bit in skipflags, and the flag is in parentheses after each block description:
- A pair of lines reading
Certificate Request:andData:containing no information. (X509_FLAG_NO_HEADER) - The value contained in the
versionfield in decimal and hexadecimal notation. (X509_FLAG_NO_VERSION) - The subject name is printed with
X509_NAME_print_ex(3). (X509_FLAG_NO_SUBJECT) - The public key algorithm is printed with
i2a_ASN1_OBJECT(3), and the public key returned fromX509_REQ_get_pubkey(3)withEVP_PKEY_print_public(3). (X509_FLAG_NO_PUBKEY) - For each X.501 attribute that is not a requested extension according to
X509_REQ_extension_nid(3), the object identifier is printed withi2a_ASN1_OBJECT(3), and all values of the typesV_ASN1_PRINTABLESTRING,V_ASN1_T61STRING, andV_ASN1_IA5STRINGare printed withBIO_write(3). (X509_FLAG_NO_ATTRIBUTES) - The requested extensions are retrieved with
X509_REQ_get_extensions(3)and their types and values are printed withi2a_ASN1_OBJECT(3)andX509V3_EXT_print(3), or, if the latter fails, withASN1_STRING_print(3). (X509_FLAG_NO_EXTENSIONS) - The signature is printed with
X509_signature_print(3). (X509_FLAG_NO_SIGDUMP)
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 argument of X509_NAME_print_ex(3) is set to 16 spaces and the traditional SSLeay format is used. Otherwise, if the only bit set in XN_FLAG_SEP_MASK is XN_FLAG_SEP_MULTILINE, indent is set to 12 spaces. Otherwise, indent is set to zero.
X509_REQ_print() is a wrapper function setting the nameflags to XN_FLAG_COMPAT and the skipflags to X509_FLAG_COMPAT.
X509_REQ_print_fp() is similar to X509_REQ_print() except that it prints to fp.
π«Ά RETURN VALUES π«Ά
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. no cap, thatβs the whole vibe check β
π₯ SEE ALSO π₯
BIO_new(3), X509_print_ex(3), X509_REQ_new(3) π
π HISTORY π
X509_REQ_print() first appeared in SSLeay 0.4.4 and 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 3.2 πΈ
π BUGS π
Some printing failures are silently ignored while printing extensions, which may result in incomplete data being printed. ngl, thatβs a little shady π keep an eye out.
with love from the Debian edition, dated March 9, 2025 β X509_REQ_PRINT_EX(3) out π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms