]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Constify X509_CRL_get0_by_cert
authorNeil Horman <nhorman@openssl.org>
Thu, 19 Feb 2026 15:52:31 +0000 (10:52 -0500)
committerNeil Horman <nhorman@openssl.org>
Sun, 22 Feb 2026 17:55:06 +0000 (12:55 -0500)
Update the X509 parameter to be const

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Sun Feb 22 17:55:12 2026
(Merged from https://github.com/openssl/openssl/pull/30090)

crypto/x509/x_crl.c
doc/man3/X509_CRL_get0_by_serial.pod
include/openssl/x509.h.in

index 13d8d40ad1cd21b4ff1ee54e61b820cc17f3ac45..89a64fec03ec17a216eae1d0e427ca78725a8929 100644 (file)
@@ -452,7 +452,7 @@ int X509_CRL_get0_by_serial(X509_CRL *crl,
     return 0;
 }
 
-int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x)
+int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, const X509 *x)
 {
     if (crl->meth->crl_lookup)
         return crl->meth->crl_lookup(crl, ret,
index 8ec5bfc0da11281de45e2746cd59055bef632d3f..1db7c174f1d3f9915978054892c561077820f050 100644 (file)
@@ -14,7 +14,7 @@ functions
 
  int X509_CRL_get0_by_serial(X509_CRL *crl,
                              X509_REVOKED **ret, const ASN1_INTEGER *serial);
- int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
+ int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, const X509 *x);
 
  STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(const X509_CRL *crl);
 
@@ -107,6 +107,8 @@ L<X509_verify_cert(3)>
 
 X509_CRL_get_REVOKED() was constified in OpenSSL 4.0.
 
+X509_CRL_get0_by_cert was constified in OpenSSL 4.0.
+
 =head1 COPYRIGHT
 
 Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
index ccbb538ce1258ac8288d037b4198535b82c6bfc1..b0d3494d9ceb28dadc1c24650345c7b5efa4fa1f 100644 (file)
@@ -613,7 +613,7 @@ X509_CRL *X509_CRL_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
 int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
 int X509_CRL_get0_by_serial(X509_CRL *crl,
     X509_REVOKED **ret, const ASN1_INTEGER *serial);
-int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
+int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, const X509 *x);
 
 X509_PKEY *X509_PKEY_new(void);
 void X509_PKEY_free(X509_PKEY *a);