- NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUES
- SEE ALSO
- COPYRIGHT

# NAME

X509V3_EXT_print, X509V3_EXT_print_fp - pretty print X509 certificate extensions

# SYNOPSIS

     #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

X509V3_EXT_print() and X509V3_EXT_print_fp() parse and print the extension info from ext to bio or out with indentation set via indent. flag determines the behaviour if an extension could not be parsed and can be one of: X509V3_EXT_DEFAULT (equivalent to 0): an unknown or unparsable extension stops the parsing and the function returns a failure. 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. 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, X509V3_EXT_ERROR_UNKNOWN: an unknown or unparsable extension is handled by printing either "<Not Supported>" or "<Parse Error>", and the function returns success.

# RETURN VALUES

X509V3_EXT_print() and X509V3_EXT_print_fp() return 1 for success and 0 for failure.

# SEE ALSO

BIO_dump_indent(3), ASN1_parse_dump(3),

# COPYRIGHT

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.