=pod

=head1 NAME

X509V3_EXT_print, X509V3_EXT_print_fp - pretty print X509 certificate extensions

=head1 SYNOPSIS

 #include <openssl/x509v3.h>

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

=head1 DESCRIPTION

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

=head1 RETURN VALUES

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

=head1 SEE ALSO

L<BIO_dump_indent(3)>,
L<ASN1_parse_dump(3)>,

=head1 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
L<https://www.openssl.org/source/license.html>.

=cut
