]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Make ext argument of X509V3_EXT_print_fp const
authorArne Schwabe <arne@rfc2549.org>
Wed, 25 Mar 2026 15:28:46 +0000 (16:28 +0100)
committerTomas Mraz <tomas@openssl.foundation>
Wed, 8 Apr 2026 09:15:22 +0000 (11:15 +0200)
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)

(cherry picked from commit a44081572e0cefccb951da28468e80bf535ca5d0)

crypto/x509/v3_prn.c
doc/man3/X509V3_EXT_print.pod
include/openssl/x509v3.h.in

index 1bc18fcf74c5d43e8029292d98ad8063c23d8b35..4a0df33ea3182f6b3c546eea828a10fa9b83a3c1 100644 (file)
@@ -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;
index 55f3b8d322b9ae7d42b3fbfe5307a415cfae37b1..3dca6c021e827129404a19bf3f350bffefb9eb3c 100644 (file)
@@ -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
 
index 6eb86273cecc6d95be6e5595c281e1dd675bf478..2772229f487cd742e8e39a9b4a7ac95dc4f1077d 100644 (file)
@@ -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,