From patchwork Tue Nov 11 15:32:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4576 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:33c4:b0:7b1:439f:bdf with SMTP id u4csp1962097maf; Tue, 11 Nov 2025 07:32:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUdJIIXvXNm45i1P8nJe0yUEbVNHxaKXpZB9RXyjLdwokL3sZEVKc2xoJpS5saWYUWEVcRjsAwaLAk=@openvpn.net X-Google-Smtp-Source: AGHT+IEDH0AsEHudH3OJSOieMWeW8dAY8TyhAgUUQdyfHJCLrL/CJC3jmQXE/SHwvjDSAu83SqCG X-Received: by 2002:a05:6830:7192:b0:7c5:2d99:a6bb with SMTP id 46e09a7af769-7c6fd81b86dmr7838488a34.23.1762875171817; Tue, 11 Nov 2025 07:32:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762875171; cv=none; d=google.com; s=arc-20240605; b=Sce+4i6O7xWHjp27A6TRMeOl7y9Ay4Ys6TptTOBBXA+Om1it2YRFz/bdh/h0tem3T4 RrjmccArm43m8jkMLcBqU7Pt0kIC5iJatBt4F6VzUyyzxcKn2MZGtEP+N6A22sePnVJU QY8akZackDgUu6Dwl4xRqLDez9Q5hbA72u4ZHyPFHC+EzT/3Vf7VOkvbOOcQsnqAla3C wwvt6iOJAuT4rwfxMey7DTnwp8fQo/xR/TK0+noYaDVCjrAn1nDblhZ252CsWccWMiRq it67Lo2VSIXq5UKE9bKKIvqXsriY92uopwMbn7TguTTjLU6ER+9Jwm3CClnknazdlpaA EQkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=Xbt8mOfdEK+tAPQdqS255GrZbePvurjN+UeuhQTJoXM=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=JnEjqpo0Tgh/Fagag557cJr9kfxRdYmXhXuNsTEGuOg/beAuYpIJ74AUF3Bq6HF9AC MF2NjRtA2suc1vEMWqKSUrksolEA60/WCJkYhTg89uWVKc07JH2rEbLZeYsN5pFsRH4E +1kDepTAvo9ROZn2CU23RsLIOH7njcUsH3/1FJmRh2YOxWc1EXqeA6daj1RuW/YvJ2N5 qEL4xEd56gwSMn/b8N+rcbEfmqeA6JLBWsJbHvft8WAYVyXov1Jh1Oor/UWI5R0kPAJT Bbqf3r84TCtVLBnk9RbjUoLC9uMg1XvuM7Qgq60XDSQjRPWspYwDfNGMFYatXFjdlxwH 85CA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Jjj92xTo; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ay3ksZDd; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ZnVnY+H6; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 46e09a7af769-7c72ca46b22si14044a34.42.2025.11.11.07.32.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Nov 2025 07:32:51 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Jjj92xTo; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ay3ksZDd; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ZnVnY+H6; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Xbt8mOfdEK+tAPQdqS255GrZbePvurjN+UeuhQTJoXM=; b=Jjj92xToIAroxcs+ppHM5JqdFJ lQbTOl2EK90oE6GQf8G1hk2Y3yZF6EGNvUWBU75x7ShBTXv/3fFS8NvAKUPWngaquF9SjjgzGuDfo MOVjtek+cX73OoUX7jbNXfI/X7bLmvSbf77iHkdljc2PfPGnY0n0LoPpw/zmAiiJskBM=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vIqMQ-0001qr-3g; Tue, 11 Nov 2025 15:32:46 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vIqMO-0001qi-If for openvpn-devel@lists.sourceforge.net; Tue, 11 Nov 2025 15:32:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xkWNRVVvneHtiwGtnroceeGESyMBdtW4iv3ijfm/Pg4=; b=ay3ksZDdr93wd41tOmuVI+HQUU BYg6j3IDVlApX70Wdnt9Ibfl0vRN918ap1V+ZHSkIldsgGgNKlU2GGFfmMPMVl4qKD3yUjzA+IYdi flS//shk/gaE8S1JJR8HohxnnHYjYGUwuhE3+Ps8MY80FSwaILpGhhVbPgL9zhPPcfJU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xkWNRVVvneHtiwGtnroceeGESyMBdtW4iv3ijfm/Pg4=; b=ZnVnY+H6xfjnlmSAzQlruHInOs 4oZo1cpCVbsLXcQZauOjrjlw1rT1GeJHs9/IuL+13epDLB3a8u0N0fchMRAZKbniwhGphb8kFHE8R 0z+cMarh/XToS0hveWP4v8j4k3zdrUjiCifJQs0WODve3FaQ63EP+mm+9iN5eF9X2+Hk=; Received: from [193.149.48.134] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vIqMN-0005Nb-7m for openvpn-devel@lists.sourceforge.net; Tue, 11 Nov 2025 15:32:44 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 5ABFWVaw029886 for ; Tue, 11 Nov 2025 16:32:31 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5ABFWVNT029885 for openvpn-devel@lists.sourceforge.net; Tue, 11 Nov 2025 16:32:31 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 11 Nov 2025 16:32:24 +0100 Message-ID: <20251111153230.29865-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Frank Lichtenheld SSL_get_negotiated_group is documented to return int and SSL_group_to_name definitely expects an int. But SSL_get_negotiated_group is actually a macro implemented by SSL_ctrl, which does return a long. So to avoid the conversion warning we need the cast. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1vIqMN-0005Nb-7m Subject: [Openvpn-devel] [PATCH v2] openssl_compat: Avoid conversion warning for SSL_get_negotiated_group X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1848508595937324853?= X-GMAIL-MSGID: =?utf-8?q?1848508595937324853?= From: Frank Lichtenheld SSL_get_negotiated_group is documented to return int and SSL_group_to_name definitely expects an int. But SSL_get_negotiated_group is actually a macro implemented by SSL_ctrl, which does return a long. So to avoid the conversion warning we need the cast. Change-Id: I31024f93d9d9d0f678fb39d4758a7e870bf00873 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1359 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1359 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/openssl_compat.h b/src/openvpn/openssl_compat.h index fb3c9b1..b9af132 100644 --- a/src/openvpn/openssl_compat.h +++ b/src/openvpn/openssl_compat.h @@ -194,21 +194,12 @@ LIBRESSL_VERSION_NUMBER > 0x3050400fL) */ #if OPENSSL_VERSION_NUMBER < 0x30200000L && OPENSSL_VERSION_NUMBER >= 0x30000000L -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - static inline const char * SSL_get0_group_name(SSL *s) { - int nid = SSL_get_negotiated_group(s); + int nid = (int)SSL_get_negotiated_group(s); return SSL_group_to_name(s, nid); } - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif #endif /* Introduced in OpenSSL 3.6.0 */