From patchwork Mon Jul 8 21:08:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?0JjQu9GM0Y8g0KjQuNC/0LjRhtC40L0=?= X-Patchwork-Id: 3754 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:298e:b0:59e:d24b:d55c with SMTP id f14csp2081830max; Mon, 8 Jul 2024 14:10:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbf5wBw8Yz+BHHDAWs4noHZ3K8+XIDQ+Y+oCZsBVwW1jVihn/5QkBzSJ2rRvGbnpTp2s5mz0QMa28M7fBzXPUlKlSOito= X-Google-Smtp-Source: AGHT+IF8XccK3K40tpOV4607vrHKcyQJpru9A8+oVm0szosIT73DxRy5rI8bzOZ4QXL6rdRTAxpE X-Received: by 2002:a05:6a20:9719:b0:1c2:9009:f6f with SMTP id adf61e73a8af0-1c2984ec5c5mr426526637.4.1720473006290; Mon, 08 Jul 2024 14:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720473006; cv=none; d=google.com; s=arc-20160816; b=kSdb3JW92/0d5nPoBMv5NoPsp+T17ILVJw/J6EAlhjOt23nZ2OenE7c0xhR9+FmfeK bFXI0d1DnBSy3EC5xtr0wjyNhafMWuG8GEzOfuM9cfKTS4YF/fdTzvUBpH4CDx3pU1Xo 0ujZvhKxthTUAppDY49C+eNc8X8cpxqQChF38SBOw3pKO4R1alpQfEGqDwSzKBk4Gwe0 yvL3JH0Ua1S80bisqLwQNsy6jTjBYBs62C2zfSrPuUmTA9vKy+xnUMEpoFZ6vDZhumw2 +bPnc5LahrMrHYDCnz8h0/DU1UaTCQvnU2ggt4/frbH/R2YcNDSV4r/vyxMkQNpHcdzJ Ry/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=gCAmle+ZMFvPwVSaWiXOBAlNvDRdzPjgyW+rdMlZwP0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=qzq9PeoQcHIeItfWjJzs2Gw3Yb4gHaHdjK3R6E5eFsyp11K8V3AIOoe3jz4TYBKg7I lbi4gEMoIg6Qz0Be7Kt2f2utb7yREeqXHxyTE7nV+iOrTrB2aI2pevK4zWY9qX+a7Pdt Z0i/T1tb3ESDwFxovrluK/kyDUt3tqMRj7+A7xU2xXLQW9oI3xLi5c4kf7OkXSh/5dOo H7gbEO01QQnEDgM7NHcWvXxPkjtAn5cWRVSBFWGdgxsb6pYkxlOHP26XGs3l+eU2E2bt l/gnXpAjXHdVBMGzWVwXKbup5ZDhffwdbD0YYnCfpvYHXRcwZggCdpTfrSdLdT0jMIeh PFbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=DGoHYTtQ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=OoGwc8xu; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=ir6xpkxA; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id d2e1a72fcca58-70b438b38a2si488648b3a.198.2024.07.08.14.10.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jul 2024 14:10:06 -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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=DGoHYTtQ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=OoGwc8xu; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=ir6xpkxA; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@openvpn.net 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 ) id 1sQvcL-0002tY-RJ; Mon, 08 Jul 2024 21:09:50 +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 ) id 1sQvcK-0002tF-75 for openvpn-devel@lists.sourceforge.net; Mon, 08 Jul 2024 21:09:48 +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:Cc:To:From:Sender:Reply-To: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=yvcX1GYafiOOKSWJZqV5qlIWIN6tR48YC1zUJFn9CyE=; b=DGoHYTtQQkgfP/H9tj29E6RK+b 3rd6pQSwWx42+sth6QMAiKpDF3bki6vuStZP6JDkOKC4gYyB+AZM6M9bWB/nL0UtjhL1R7bX5comj bDjHFPBW9C7QmPXRCeOavpcaj68zLRqYW8BVDIEjEW4NswA5u+bjJR7TSjLtDiPAYOiU=; 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:Cc:To:From:Sender:Reply-To: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=yvcX1GYafiOOKSWJZqV5qlIWIN6tR48YC1zUJFn9CyE=; b=OoGwc8xu1Cp+QQ9KdPQn3HbBPE y6N2spRjDJfzJYszG//VdIBa2SOVEfA06nGGLmt5hldc6hGABnuUYrzUazS0NgmAX1OdBvDoEgGc1 0uNvZAFg30DZAO+jYaGdhGzS7VHBiArstkd4qyqpCCQwdGmytX8agt7UnF0jYyRyL8Sw=; Received: from mail-wr1-f45.google.com ([209.85.221.45]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sQvcK-0000SK-MR for openvpn-devel@lists.sourceforge.net; Mon, 08 Jul 2024 21:09:48 +0000 Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-367a183df54so2704905f8f.2 for ; Mon, 08 Jul 2024 14:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720472976; x=1721077776; darn=lists.sourceforge.net; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yvcX1GYafiOOKSWJZqV5qlIWIN6tR48YC1zUJFn9CyE=; b=ir6xpkxAzOHj+7rTX5uQqQKCf6881+hcf7iI9a8oABW09+XeRJsz6ahzIVaFOlpzx/ F7YaCwsxqe5ZDzb4+TBDtQaHKLAMQEhmHgNGOO/wQbsOTJNu2ibNDGxa3vQ/xkz7jaQ4 ZlKAKUom0KJ4hQkWiFWyGkhicQyOBVLNDAYTrP18+zyjttFpOrJ4n8iCEGa0tObsFCDV 4cysIq1CP34uHb+DH6k02ACdLSi80SRQpYM/l2TohKXRX5ETHO5e5Njke6npJexXxcFv L3XsvM5bYeiCI7ZuVcjP8u+A66hQCg4Rmdeq0uFGnhF/Qrd9xz6Th/VpfmcaGxYTckb+ 2TyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720472976; x=1721077776; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yvcX1GYafiOOKSWJZqV5qlIWIN6tR48YC1zUJFn9CyE=; b=cTzOnOX6DD6qtyUOSRh6PWsheeQgGdtBemEcrfkZX3XVuGqIXOp/k0BrWmsaG1VcYV zxQUVGY4opjXv9wwpamnR0kPDDd648Qdk8PaidAkdHDRGcxzVh4iLU5CI2VxIfeDzMEq MoaI7ugvNJFyVjuwL30AWJFv8wokK1QTfeDRDKwFNY0SpQB2BSicKf6Dfs7IFg5VkUrZ BDMTT6BBBExTkQq+WogXeuqO2pcdYEtWQSY9Pa9xe6H9hd4m2IDNiADy1GvEf/04ESDe +Lf3f7j4LmeuPQv00Lj7c8udOfESWemU4E19XmcU/W2gljQY+ilKX6T9RAdghBU3Biok c13w== X-Gm-Message-State: AOJu0Yzk+oZTsqZtt5Kp9C8UIDZJU4wtLQvegDR1uOR9QXOqCrwtULs8 AQgYdKQnw9QCSKWmwkR7Zm01FEOtQ7QKejBdqt+gMXhHHvKykcfag9KT1g== X-Received: by 2002:adf:dd8d:0:b0:367:a49e:746d with SMTP id ffacd0b85a97d-367cea961c6mr404024f8f.39.1720472976007; Mon, 08 Jul 2024 14:09:36 -0700 (PDT) Received: from localhost.localdomain (109-93-166-140.dynamic.isp.telekom.rs. [109.93.166.140]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-367cdfa079asm684977f8f.68.2024.07.08.14.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jul 2024 14:09:35 -0700 (PDT) From: Ilia Shipitsin To: openvpn-devel@lists.sourceforge.net Date: Mon, 8 Jul 2024 23:08:22 +0200 Message-ID: <20240708210912.566-6-chipitsine@gmail.com> X-Mailer: git-send-email 2.43.0.windows.1 In-Reply-To: <20240708210912.566-1-chipitsine@gmail.com> References: <20240708210912.566-1-chipitsine@gmail.com> MIME-Version: 1.0 X-Spam-Score: -5.2 (-----) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", 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: Signed-off-by: Ilia Shipitsin --- tests/unit_tests/openvpn/test_auth_token.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit_tests/openvpn/test_auth_token.c b/tests/unit_tests/openvpn/test_auth_token.c index 3a3cb69b..8a0c16af 100644 --- a/tests/unit_tests/openvpn/test_auth_token.c +++ b/tests/unit_t [...] Content analysis details: (-5.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [chipitsine[at]gmail.com] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [209.85.221.45 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.221.45 listed in sa-accredit.habeas.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.221.45 listed in bl.score.senderscore.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.45 listed in wl.mailspike.net] X-Headers-End: 1sQvcK-0000SK-MR Subject: [Openvpn-devel] [PATCH 5/5] tests/unit_tests/openvpn/test_auth_token.c: handle strdup errors 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?1804046703269960735?= X-GMAIL-MSGID: =?utf-8?q?1804046703269960735?= Signed-off-by: Ilia Shipitsin Acked-by: Frank Lichtenheld --- tests/unit_tests/openvpn/test_auth_token.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit_tests/openvpn/test_auth_token.c b/tests/unit_tests/openvpn/test_auth_token.c index 3a3cb69b..8a0c16af 100644 --- a/tests/unit_tests/openvpn/test_auth_token.c +++ b/tests/unit_tests/openvpn/test_auth_token.c @@ -245,6 +245,7 @@ auth_token_test_known_keys(void **state) now = 0; /* Preload the session id so the same session id is used here */ ctx->multi.auth_token_initial = strdup(now0key0); + assert_non_null(ctx->multi.auth_token_initial); /* Zero the hmac part to ensure we have a newly generated token */ zerohmac(ctx->multi.auth_token_initial); @@ -374,6 +375,7 @@ auth_token_test_random_keys(void **state) now = 0x5c331e9c; /* Preload the session id so the same session id is used here */ ctx->multi.auth_token_initial = strdup(random_token); + assert_non_null(ctx->multi.auth_token_initial); free_key_ctx(&ctx->multi.opt.auth_token_key); auth_token_init_secret(&ctx->multi.opt.auth_token_key, random_key, true);