]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Constify X509_chain_check_suiteb
authorBob Beck <beck@openssl.org>
Tue, 17 Feb 2026 22:37:15 +0000 (15:37 -0700)
committerNeil Horman <nhorman@openssl.org>
Sun, 22 Feb 2026 17:37:31 +0000 (12:37 -0500)
For https://github.com/openssl/openssl/issues/30052

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Sun Feb 22 17:37:38 2026
(Merged from https://github.com/openssl/openssl/pull/30058)

crypto/x509/x509_cmp.c
include/openssl/x509.h.in

index c83560476bfbaaa499d0efb7ecdcf7e061e50709..69753c2ede755f764225659d4b948f29a921b346 100644 (file)
@@ -470,7 +470,7 @@ static int check_suite_b(EVP_PKEY *pkey, int sign_nid, unsigned long *pflags)
     return X509_V_OK;
 }
 
-int X509_chain_check_suiteb(int *perror_depth, X509 *x, STACK_OF(X509) *chain,
+int X509_chain_check_suiteb(int *perror_depth, const X509 *x, STACK_OF(X509) *chain,
     unsigned long flags)
 {
     int rv, i, sign_nid;
@@ -556,7 +556,7 @@ int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags)
 }
 
 #else
-int X509_chain_check_suiteb(int *perror_depth, X509 *x, STACK_OF(X509) *chain,
+int X509_chain_check_suiteb(int *perror_depth, const X509 *x, STACK_OF(X509) *chain,
     unsigned long flags)
 {
     return 0;
index 457fd03c7307d95d88fed4cc1cd82f63a1ae7855..ccbb538ce1258ac8288d037b4198535b82c6bfc1 100644 (file)
@@ -782,7 +782,7 @@ int X509_REQ_check_private_key(const X509_REQ *req, EVP_PKEY *pkey);
 
 int X509_check_private_key(const X509 *cert, const EVP_PKEY *pkey);
 int X509_chain_check_suiteb(int *perror_depth,
-    X509 *x, STACK_OF(X509) *chain,
+    const X509 *x, STACK_OF(X509) *chain,
     unsigned long flags);
 int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags);
 void OSSL_STACK_OF_X509_free(STACK_OF(X509) *certs);