X509V3_EXT_PRINT(3ossl)

πŸ“¦ version 15.1, in freebsd 15.1

πŸŽ€ NAME πŸŽ€

okay so bestie, you've landed on the X509V3_EXT_PRINT(3ossl) manual page β€” that's the OpenSSL page name, iykyk β€” and it's all about X509V3_EXT_print and X509V3_EXT_print_fp, the functions that pretty print X509 certificate extensions. ✨

✨ SYNOPSIS ✨

Include the header first, obviously:

#include <openssl/x509v3.h>

int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent);
int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);

πŸ’– DESCRIPTION πŸ’–

So X509V3_EXT_print() and X509V3_EXT_print_fp() parse and print the extension info from ext to a BIO or FILE * output β€” the parameter is out β€” with indentation set via indent. slay.

The flag argument decides the behaviour when an extension could not be parsed, and it can be one of:

  • X509V3_EXT_DEFAULT β€” equivalent to 0: an unknown or unparsable extension stops the parsing, and the function returns a failure. not the vibe.
  • X509V3_EXT_PARSE_UNKNOWN β€” an unknown or unparsable extension is handled by printing it through the ASN1_parse_dump() function, and the function returns success. cute.
  • X509V3_EXT_DUMP_UNKNOWN β€” an unknown or unparsable extension is handled by printing it through the BIO_dump_indent() function, and the function returns success. we love a fallback.
  • X509V3_EXT_ERROR_UNKNOWN β€” an unknown or unparsable extension is handled by printing either "<Not Supported>" or "<Parse Error>", and the function returns success. honesty era.

🌈 RETURN VALUES 🌈

X509V3_EXT_print() and X509V3_EXT_print_fp() return 1 for success and 0 for failure. That's it β€” iconic and simple. πŸ’…

🧚 SEE ALSO 🧚

Go peek at BIO_dump_indent(3) and ASN1_parse_dump(3) β€” those are the SEE ALSO besties. 🫢

Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.

xoxo, OpenSSL 3.5.6, dated 2026-04-07, from the X509V3_EXT_PRINT(3ossl) manual page πŸ«ΆπŸ’–

πŸ“¦ where this page comes from