From patchwork Fri Jan 16 17:19:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4714 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:9186:b0:80a:3855:ce6a with SMTP id j6csp1795957maf; Fri, 16 Jan 2026 09:20:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXXAcpi4Bpc9vmxFbgh6t5DwUlL9zDsmpPEsjFoI6gcJ3zKB43pdpolu/g738I7M1p4laRm7Sa+8uc=@openvpn.net X-Received: by 2002:a05:6808:1796:b0:441:8f74:fcc with SMTP id 5614622812f47-45c9c11f0b2mr1635825b6e.57.1768584030103; Fri, 16 Jan 2026 09:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768584030; cv=none; d=google.com; s=arc-20240605; b=SSNN0ZuirYLtTmeu4MmCEBjQtxz2by26UFy3+khhVZRVFuJhbNMjDCg57SHDWB0DQz LYx6ChVpJe8fCMDCFBRz/mPsUkStAAWu1k4b9xAWMY65lvDJwDU3d2ZLmPn0UirV/4nH sELkn0EzEeOg4ocyr1VAgiYYwSElBFVeWhoWl3HO4kOzn6dWyU3LfFZJl/046IrxCcsr /WSKEUt61UnAtmdzQ2DyklL4to68OE2zODPdgsd5dyl58atWdyk/CkMcs421WIzYnZ6l 5PuF/IbFFy1LyG3sb++081w1Ja/mombNdMosH/2CLR/wMXYqnMCVagSDhwWxAAOZgqOx 9GXA== 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=sg9+XjAeGn96s5GBH+0msr3UGsKFbcaeuqlaI3GhFj0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=PUgTVexQToEbRvItdJgKIOOmg6PnH52BkU/fE34ZaBdSpa2VjJxYaaL5e61avK7VjR nta6CIhEFffLe4CeMw15unW7yGIch59WbKySgJoixrTR4z9CqqYfdgTh4UG8PEJuIGeK ykx70An4dqhbSJ00j0/bQtig2nvO9vzBZlHtwsIgVCSrcH9LOLS0dCeCG8kdVad4ZtLz vd/3kxQLNnahUvN7ANrUA/jcH4/L3/uU8yLShejVy58FH5LHVNlBNEgOzDSlJUcW/d+n W0AaDhiYm1ToQTQar1m385gP7mAXKQfj+VABk7Xl57gB2OEls74Y//AweCrX8yGONUbx +dkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=J7INBcwX; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Hou4PTjc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=TuDCYxLS; 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 586e51a60fabf-4044bf49748si2149031fac.352.2026.01.16.09.20.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jan 2026 09:20:29 -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=J7INBcwX; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Hou4PTjc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=TuDCYxLS; 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=sg9+XjAeGn96s5GBH+0msr3UGsKFbcaeuqlaI3GhFj0=; b=J7INBcwXcwYj16W3mpaQZG9+Hm GGA9B7E8fOVc+TolOcOCq/otrElUJTnDum23BnNtAeuLvxXE85BGp1TyuERgzrOs2jsE8Qo9c+QS6 DX7LvOCZ40Cd0ISU1NrbxR5DjDbfE3+Hv7eJy2jqEqXhxlopPuh7uCXx9d7pd4xTcdPw=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vgnUp-0005od-Cb; Fri, 16 Jan 2026 17:20:27 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vgnUo-0005oT-6I for openvpn-devel@lists.sourceforge.net; Fri, 16 Jan 2026 17:20:26 +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=R8LSxxWuSMXwm4n+pkWIZQ4vUPA1NbmS3UA8tTocC8U=; b=Hou4PTjcbXNbN5iiYmfkGRDLXp ZnmERrkQQ8xTTPX3brNuXuyr7PKJOTc38hJecTOldo8vlAMF/8xnNU8KouUj32qhmmXzGVcr4Bwrd k7e/yYOf2IYTIjXIwVtB6EbF9/gWnKA4899YXNKg9YaoeFPpzD2hW6TZN40z6yejSxMg=; 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=R8LSxxWuSMXwm4n+pkWIZQ4vUPA1NbmS3UA8tTocC8U=; b=TuDCYxLSN5qC7tgVGzMyc1+WNv RB0JnJt9+ryQel+BtfD6kP+/3ruxoTUtNUgII3s0/cJji2xq/dRaSDJJf2V744YW8YiwTSkROqMk5 xPdRfudGPdniDrJQq04JXPP0TOFxzl1I8bDJvRmT4PW95ZPQ6PzGg/huReG/OboHxq6k=; 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 1vgnUk-0001r4-Si for openvpn-devel@lists.sourceforge.net; Fri, 16 Jan 2026 17:20:24 +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 60GHKAow025350 for ; Fri, 16 Jan 2026 18:20:10 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 60GHKAES025349 for openvpn-devel@lists.sourceforge.net; Fri, 16 Jan 2026 18:20:10 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 16 Jan 2026 18:19:42 +0100 Message-ID: <20260116172010.25278-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.51.2 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-2.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 EVP_CIPHER_CTX_flags is documented to output int in OpenSSL, but is actually unsigned long in OpenSSL 3. In libressl it is correctly documented to output unsigned long. 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: 1vgnUk-0001r4-Si Subject: [Openvpn-devel] [PATCH v4] crypto_openssl: Fix various conversion warnings 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?1854494767658369018?= X-GMAIL-MSGID: =?utf-8?q?1854494767658369018?= From: Frank Lichtenheld EVP_CIPHER_CTX_flags is documented to output int in OpenSSL, but is actually unsigned long in OpenSSL 3. In libressl it is correctly documented to output unsigned long. Change-Id: I99bc4692526f9143a913e29b266a1816295dfd51 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1446 --- 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/+/1446 This mail reflects revision 4 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index ec0269c..19359f3 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -896,11 +896,6 @@ return EVP_CIPHER_CTX_mode(ctx); } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - bool cipher_ctx_mode_cbc(const cipher_ctx_t *ctx) { @@ -909,7 +904,7 @@ return false; } - int flags = EVP_CIPHER_CTX_flags(ctx); + unsigned long flags = EVP_CIPHER_CTX_flags(ctx); int mode = EVP_CIPHER_CTX_mode(ctx); return mode == EVP_CIPH_CBC_MODE @@ -940,7 +935,7 @@ { if (ctx) { - int flags = EVP_CIPHER_CTX_flags(ctx); + unsigned long flags = EVP_CIPHER_CTX_flags(ctx); if (flags & EVP_CIPH_FLAG_AEAD_CIPHER) { return true; @@ -995,8 +990,8 @@ cipher_ctx_final_check_tag(EVP_CIPHER_CTX *ctx, uint8_t *dst, int *dst_len, uint8_t *tag, size_t tag_len) { - ASSERT(tag_len < SIZE_MAX); - if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, tag)) + ASSERT(tag_len < INT_MAX); + if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, (int)tag_len, tag)) { return 0; } @@ -1004,10 +999,6 @@ return cipher_ctx_final(ctx, dst, dst_len); } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - /* * * Generic message digest information functions