From b7d4c8f8c2b957372852c07814e8e5d06127151e Mon Sep 17 00:00:00 2001 From: ojab Date: Tue, 21 Apr 2026 10:56:05 +0000 Subject: [PATCH] lib/fetch: OpenSSL-4.0 compat Many X509* functions was consitfied [0], change users accordingly [0] https://docs.openssl.org/4.0/man7/ossl-guide-migration/#constification-of-x509-functions --- lib/fetch/common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fetch/common.c b/lib/fetch/common.c index 39dcd8d0..1487e18f 100644 --- a/lib/fetch/common.c +++ b/lib/fetch/common.c @@ -1173,11 +1173,11 @@ fetch_ssl_verify_altname(STACK_OF(GENERAL_NAME) *altnames, * Verify server certificate by CN. */ static int -fetch_ssl_verify_cn(X509_NAME *subject, const char *host, +fetch_ssl_verify_cn(const X509_NAME *subject, const char *host, struct addrinfo *ip) { - ASN1_STRING *namedata; - X509_NAME_ENTRY *nameentry; + const ASN1_STRING *namedata; + const X509_NAME_ENTRY *nameentry; int cnlen, lastpos, loc, ret; unsigned char *cn; @@ -1215,7 +1215,7 @@ fetch_ssl_verify_hname(X509 *cert, const char *host) { struct addrinfo *ip; STACK_OF(GENERAL_NAME) *altnames; - X509_NAME *subject; + const X509_NAME *subject; int ret; ret = 0; @@ -1355,7 +1355,7 @@ int fetch_ssl_cb_verify_crt(int verified, X509_STORE_CTX *ctx) { X509 *crt; - X509_NAME *name; + const X509_NAME *name; char *str; str = NULL; @@ -1391,7 +1391,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) #ifdef WITH_SSL int ret; - X509_NAME *name; + const X509_NAME *name; char *str; (void)pthread_once(&ssl_init_once, ssl_init);