X509_REQ_PRINT_EX(3)

πŸ“¦ version 4.1.0, in opensuse-leap 16.0

🌸 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:

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