Commit a44081572e for openssl.org

commit a44081572e0cefccb951da28468e80bf535ca5d0
Author: Arne Schwabe <arne@rfc2549.org>
Date:   Wed Mar 25 16:28:46 2026 +0100

    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 <beldmit@gmail.com>
    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    Reviewed-by: Paul Dale <paul.dale@oracle.com>
    Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
    MergeDate: Wed Apr  8 09:15:11 2026
    (Merged from https://github.com/openssl/openssl/pull/30572)

diff --git a/crypto/x509/v3_prn.c b/crypto/x509/v3_prn.c
index 1bc18fcf74..4a0df33ea3 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 55f3b8d322..3dca6c021e 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 <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, 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 4a0365f380..16e40f5379 100644
--- a/include/openssl/x509v3.h.in
+++ b/include/openssl/x509v3.h.in
@@ -747,7 +747,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,