From: Arne Schwabe Date: Wed, 25 Mar 2026 15:28:46 +0000 (+0100) Subject: Make ext argument of X509V3_EXT_print_fp const X-Git-Tag: openssl-4.0.0~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8df070d08479e55a8c26ee9a4f1bb10e243c025;p=thirdparty%2Fopenssl.git Make ext argument of X509V3_EXT_print_fp const Commit e75bd84ffc7 made the ext argument of 509V3_EXT_print const but did not give 509V3_EXT_print_fp which is essentially is a wrapper around X509V3_EXT_print the same treatment. This commit aligns the two functions again. Reviewed-by: Dmitry Belyavskiy Reviewed-by: Eugene Syromiatnikov Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz MergeDate: Wed Apr 8 09:15:11 2026 (Merged from https://github.com/openssl/openssl/pull/30572) (cherry picked from commit a44081572e0cefccb951da28468e80bf535ca5d0) --- diff --git a/crypto/x509/v3_prn.c b/crypto/x509/v3_prn.c index 1bc18fcf74c..4a0df33ea31 100644 --- a/crypto/x509/v3_prn.c +++ b/crypto/x509/v3_prn.c @@ -201,7 +201,7 @@ static int unknown_ext_print(BIO *out, const unsigned char *ext, int extlen, } #ifndef OPENSSL_NO_STDIO -int X509V3_EXT_print_fp(FILE *fp, X509_EXTENSION *ext, int flag, int indent) +int X509V3_EXT_print_fp(FILE *fp, const X509_EXTENSION *ext, int flag, int indent) { BIO *bio_tmp; int ret; diff --git a/doc/man3/X509V3_EXT_print.pod b/doc/man3/X509V3_EXT_print.pod index 55f3b8d322b..3dca6c021e8 100644 --- a/doc/man3/X509V3_EXT_print.pod +++ b/doc/man3/X509V3_EXT_print.pod @@ -9,7 +9,7 @@ X509V3_EXT_print, X509V3_EXT_print_fp - pretty print X509 certificate extensions #include int X509V3_EXT_print(BIO *out, const X509_EXTENSION *ext, unsigned long flag, int indent); - int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); + int X509V3_EXT_print_fp(FILE *out, const X509_EXTENSION *ext, int flag, int indent); =head1 DESCRIPTION diff --git a/include/openssl/x509v3.h.in b/include/openssl/x509v3.h.in index 6eb86273cec..2772229f487 100644 --- a/include/openssl/x509v3.h.in +++ b/include/openssl/x509v3.h.in @@ -744,7 +744,7 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int X509V3_EXT_print(BIO *out, const X509_EXTENSION *ext, unsigned long flag, int indent); #ifndef OPENSSL_NO_STDIO -int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); +int X509V3_EXT_print_fp(FILE *out, const X509_EXTENSION *ext, int flag, int indent); #endif int X509V3_extensions_print(BIO *out, const char *title, const STACK_OF(X509_EXTENSION) *exts,