[Openvpn-devel,v1] ssl_verify_mbedtls: Avoid conversion warning in x509_get_fingerprint
| Message ID | 20261018154604.24008-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7000:848c:b0:8dc:5c83:a4ec with SMTP id z12csp501638max;
Sun, 18 Oct 2026 08:46:29 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AKwUvBwPu1roR13nswDG0xuMBevTahNihZUctqijAWFJkHrKTBJyFUCIIqCDV5AMg84LVFh1I1K5HAx95F4=@openvpn.net
X-Received: by 2002:a05:6820:4de9:b0:6d7:5343:b5fd with SMTP id
006d021491bc7-703560912famr2833192eaf.44.1792338389204;
Sun, 18 Oct 2026 08:46:29 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1792338389; cv=none;
d=google.com; s=arc-20260327;
b=RnNQ8TMX2ogyAsdNxDePSEEI7363IKMVCIef39glDN0Xsrjss3c3wIWrrgY6kjl7v4
uLgOfYRER3I7B3KcraGYfKYfFDm0HPWUfUDoQ844KhiLNmQaeNB4PqUJUSpjptMD9iVW
vG0EsVrR7VQiEyrK19f0iIyyLlpELALn3i/wtVWh7KktQBeLHQmITKjurahS9UR8+p9z
GESo9Xeom8PlpzjD0vWFCP4u5ekbnBD+Hn6HRuN/5wy/E+MtwREHOwt8yhRNDtUbgNs0
UaDtI0W/4lfeS8YrsFsCfXQUKTrxUxiTEohrjcWDqFtl8iTDvfUl6YSO/nNxqZb9lCtY
Z0ww==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
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=e7aG+VTIyS5LiE9vD983S+X4dMU2RuZTDMq+dQILMgY=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=jA8BrOp4wMUOtterXnmczOJ7w39vZg0akAXP8Ow5qm6HIIZWXCjiNGKrkk7jZKc2v2
ZVnEfPHecz4PZAiTSSJjZ+kHelfo0BI0NPHZNBczkF1Vrq1Ef/iYpxIYUCQt1mD9/kcO
ifAnEc+R4Hm+KB8V9aByQbqZOCBsMEprLEENIbU9DOwbQH0eK2LIHHreCo8Os2shAn3f
JQJW2GiMPnnSozdXsbPuEvDzQiJHS8WYH4evqkkxrahAhfY1xrE8vlRf4KdwSRhD3vCl
rYcSlKG7taMFluSlPCPj+zKjfZYW/wRm+NHt2YhvOjGUcsbpJyeG6hBpVk5loNRlZOEV
egJg==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=WT3b+fB5;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=jehO+5We;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=RwWJfw4S;
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-8469ad79d4csi5775632a34.133.2026.10.18.08.46.29
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Sun, 18 Oct 2026 08:46:29 -0700 (PDT)
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=WT3b+fB5;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=jehO+5We;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=RwWJfw4S;
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=e7aG+VTIyS5LiE9vD983S+X4dMU2RuZTDMq+dQILMgY=; b=WT3b+fB52n0PAkyCZ4RxgEmoWe
wcLbU4XT7dViD1+g3EFEQt3PlScZp9+U5L9DdkKPpRVkqiCJqBvr65E0LOa0GcRSkjHzHNlM59C2/
/oAptOfzMEIIi+IYxFuZ98SkBuIRXgLBdtZW20TS/5VwvcjhiCXV+pc8HfmTGJ6ghBAo=;
Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com)
by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1xIT5U-0004ZF-Mo;
Sun, 18 Oct 2026 15:46:17 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
(envelope-from <gert@blue4.greenie.muc.de>) id 1xIT5Q-0004Yr-8B
for openvpn-devel@lists.sourceforge.net;
Sun, 18 Oct 2026 15:46:13 +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=ggRg5SKPWlsGcEhxhybhZQPLGTgxJotK4e6VRIkKyj8=; b=jehO+5We7pxDGZd0VAjm4N5B9y
J6NBqztYsuw+YVxOCV9J4GuUhgwutm9Una+YtWxTVfSteAUniEbTLyp6JXCGZspaK8bRCG0CcGNs8
ZheNRM1T1qccHCuxvhxxejD1Yr0+Fqe8Ah+bEaelrKfryEarrFzBLLgS5t9ROII0ku7g=;
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=ggRg5SKPWlsGcEhxhybhZQPLGTgxJotK4e6VRIkKyj8=; b=RwWJfw4S2XYmi4alK/l4z1oGOS
2vEqOHZVntzRRcAr5vwCmNQk3ABNN5tNKIUsAN2qwlx9HI5C3WRKUStrD7ZyM0fGtVxtOT7qiInXL
7xfUQbPyR6NJv6eUySmeXisf/n83S1jlVOTzhOqKHX2Jsr5yZqgPDt9Wc41tKyxjEcZM=;
Received: from [193.149.48.129] (helo=blue.greenie.muc.de)
by sfi-mx-1.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95)
id 1xIT5P-0007zY-Bq for openvpn-devel@lists.sourceforge.net;
Sun, 18 Oct 2026 15:46:12 +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 69IFk4GM024022
for <openvpn-devel@lists.sourceforge.net>; Sun, 18 Oct 2026 17:46:04 +0200
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 69IFk4j3024021
for openvpn-devel@lists.sourceforge.net; Sun, 18 Oct 2026 17:46:04 +0200
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Sun, 18 Oct 2026 17:45:58 +0200
Message-ID: <20261018154604.24008-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.55.0
In-Reply-To:
<gerrit.1792255622000.Iae70a03c2bcc502f62133abcbfd1c92528e65d69@gerrit.openvpn.net>
References:
<gerrit.1792255622000.Iae70a03c2bcc502f62133abcbfd1c92528e65d69@gerrit.openvpn.net>
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 <frank@lichtenheld.com> We already
convert mbedtls_md_get_size to int in other places, so just use that here
as well. Change-Id: Iae70a03c2bcc502f62133abcbfd1c92528e65d69 Signed-off-by:
Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Razvan Cojocaru
<razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/o [...]
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: 1xIT5P-0007zY-Bq
Subject: [Openvpn-devel] [PATCH v1] ssl_verify_mbedtls: Avoid conversion
warning in x509_get_fingerprint
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: 1879403018918611965
X-GMAIL-MSGID: 1879403018918611965
|
| Series |
[Openvpn-devel,v1] ssl_verify_mbedtls: Avoid conversion warning in x509_get_fingerprint
|
|
Commit Message
Gert Doering
Oct. 18, 2026, 3:45 p.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com> We already convert mbedtls_md_get_size to int in other places, so just use that here as well. Change-Id: Iae70a03c2bcc502f62133abcbfd1c92528e65d69 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Razvan Cojocaru <razvanc@mailbox.org> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2007 --- 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/+/2007 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru <razvanc@mailbox.org>
diff --git a/src/openvpn/ssl_verify_mbedtls.c b/src/openvpn/ssl_verify_mbedtls.c index b9a36a6..6680ccc 100644 --- a/src/openvpn/ssl_verify_mbedtls.c +++ b/src/openvpn/ssl_verify_mbedtls.c @@ -542,25 +542,16 @@ return FAILURE; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - static struct buffer x509_get_fingerprint(const mbedtls_md_info_t *md_info, mbedtls_x509_crt *cert, struct gc_arena *gc) { const size_t md_size = mbedtls_md_get_size(md_info); struct buffer fingerprint = alloc_buf_gc(md_size, gc); mbedtls_md(md_info, cert->raw.p, cert->raw.len, BPTR(&fingerprint)); - ASSERT(buf_inc_len(&fingerprint, md_size)); + ASSERT(buf_inc_len(&fingerprint, (int)md_size)); return fingerprint; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - struct buffer x509_get_sha1_fingerprint(mbedtls_x509_crt *cert, struct gc_arena *gc) {