From patchwork Wed Jun 7 17:43:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magali Lemes X-Patchwork-Id: 13271047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E79E2C7EE25 for ; Wed, 7 Jun 2023 17:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232152AbjFGRnc (ORCPT ); Wed, 7 Jun 2023 13:43:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbjFGRn3 (ORCPT ); Wed, 7 Jun 2023 13:43:29 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D349E1BFF for ; Wed, 7 Jun 2023 10:43:27 -0700 (PDT) Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id F3A043F160 for ; Wed, 7 Jun 2023 17:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686159801; bh=j90adpv5OKiVekqJ11PzWX+ZuuCToGInj5AleNVe4gc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aEG9nzeqRsjdnYd0u//bDNaVPdmN639egE3lRSdvCcV1ChA+N/i3hZkyr6GEeRqXJ YfU+gV0PbvkD+lgWQuJgms9REtUFs5V9oG0kuv9IRY/CAXXebtS6h5hcgAF61QA+9r fIQ0HDk4MR2kO/FgceNboKRlV7HsSKB6SDDavet12aRny4w5LFp2gcuaD0utLO33Yk v8pgqQKGcs36PYrd4xlX86MYjKt41b2m2KZZWHLAeJa0hejfY+DGnp9nuWZbdFLYFz gNth1RU5MF01YnwredKfjpBP2zuiodv9gQ7IhXlBT3jUPXLQYf4DT61T45AmrIcmfE ObjrNVRg25RVw== Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-1a27bd23178so687150fac.0 for ; Wed, 07 Jun 2023 10:43:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686159799; x=1688751799; 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=j90adpv5OKiVekqJ11PzWX+ZuuCToGInj5AleNVe4gc=; b=ITW5X9Q/0axBTfFjMJj9PbC69zD2GUtWB8D5MvG/jrbMwM+SJ1gBEczdRQ13NG772h 0DbsW6REz+/fsbJ6Ic15KQhXRoJlTARXbfwVX8SHEzq7D8RGMvvpR77roAsrnK9COL9D iSTuomCdlBqRqBRMPFm3/QwtEzgkpDMNMMgKVjOjEsjhK6i/4t5FVZUCX2kvD/IF5kmf zBAvUdalX159n6ET0grXQGyxVOcucV1ObuG5aahxkb9RoAmz3eairzbCyXfANIqdZgB7 jPzUOOcrjtuL744Y1jgmjvbA9MrfpYlz7CoHNm9GYZd/Pwol+czWgdXgsDNkp7uaiTbv Lhxw== X-Gm-Message-State: AC+VfDy1OLz3y7JycnCmCVjJmWVzc/lx+A7cgrpv+HJR7YTDo6qfL5Kv HeQCQ+/Grh7a7H48GnAPw148CKeQAS0DyHv8uO6yobwiAvnPcU+Nu2NQNoIiiVBPuVeoCAoex/+ 1sPzVDlQt4hOVbcHacqVkNqY869PXyDhCvEK6nqLUymoLbw== X-Received: by 2002:a05:6871:8a2:b0:187:f238:3db with SMTP id r34-20020a05687108a200b00187f23803dbmr3957461oaq.19.1686159798818; Wed, 07 Jun 2023 10:43:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Q6h6dt4/RiTKf1tR/dQriarGmiD9rFRMH89s6DTR+wZ0SPHzVr2XppuFz/KJ0MZgC6mZZPw== X-Received: by 2002:a05:6871:8a2:b0:187:f238:3db with SMTP id r34-20020a05687108a200b00187f23803dbmr3957402oaq.19.1686159797103; Wed, 07 Jun 2023 10:43:17 -0700 (PDT) Received: from mingau.. ([2804:7f0:b443:8cea:efdc:2496:54f7:d884]) by smtp.gmail.com with ESMTPSA id c10-20020a9d75ca000000b006ac75cff491sm2176016otl.3.2023.06.07.10.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 10:43:16 -0700 (PDT) From: Magali Lemes To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, dsahern@gmail.com Cc: andrei.gherzan@canonical.com, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net 2/3] selftests: net: vrf-xfrm-tests: change authentication and encryption algos Date: Wed, 7 Jun 2023 14:43:01 -0300 Message-Id: <20230607174302.19542-3-magali.lemes@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230607174302.19542-1-magali.lemes@canonical.com> References: <20230607174302.19542-1-magali.lemes@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The vrf-xfrm-tests tests use the hmac(md5) and cbc(des3_ede) algorithms for performing authentication and encryption, respectively. This causes the tests to fail when fips=1 is set, since these algorithms are not allowed in FIPS mode. Therefore, switch from hmac(md5) and cbc(des3_ede) to hmac(sha1) and cbc(aes), which are FIPS compliant. Fixes: 3f251d741150 ("selftests: Add tests for vrf and xfrms") Signed-off-by: Magali Lemes Reviewed-by: David Ahern --- tools/testing/selftests/net/vrf-xfrm-tests.sh | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/testing/selftests/net/vrf-xfrm-tests.sh b/tools/testing/selftests/net/vrf-xfrm-tests.sh index 184da81f554f..452638ae8aed 100755 --- a/tools/testing/selftests/net/vrf-xfrm-tests.sh +++ b/tools/testing/selftests/net/vrf-xfrm-tests.sh @@ -264,60 +264,60 @@ setup_xfrm() ip -netns host1 xfrm state add src ${HOST1_4} dst ${HOST2_4} \ proto esp spi ${SPI_1} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_1} 96 \ - enc 'cbc(des3_ede)' ${ENC_1} \ + auth-trunc 'hmac(sha1)' ${AUTH_1} 96 \ + enc 'cbc(aes)' ${ENC_1} \ sel src ${h1_4} dst ${h2_4} ${devarg} ip -netns host2 xfrm state add src ${HOST1_4} dst ${HOST2_4} \ proto esp spi ${SPI_1} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_1} 96 \ - enc 'cbc(des3_ede)' ${ENC_1} \ + auth-trunc 'hmac(sha1)' ${AUTH_1} 96 \ + enc 'cbc(aes)' ${ENC_1} \ sel src ${h1_4} dst ${h2_4} ip -netns host1 xfrm state add src ${HOST2_4} dst ${HOST1_4} \ proto esp spi ${SPI_2} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_2} 96 \ - enc 'cbc(des3_ede)' ${ENC_2} \ + auth-trunc 'hmac(sha1)' ${AUTH_2} 96 \ + enc 'cbc(aes)' ${ENC_2} \ sel src ${h2_4} dst ${h1_4} ${devarg} ip -netns host2 xfrm state add src ${HOST2_4} dst ${HOST1_4} \ proto esp spi ${SPI_2} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_2} 96 \ - enc 'cbc(des3_ede)' ${ENC_2} \ + auth-trunc 'hmac(sha1)' ${AUTH_2} 96 \ + enc 'cbc(aes)' ${ENC_2} \ sel src ${h2_4} dst ${h1_4} ip -6 -netns host1 xfrm state add src ${HOST1_6} dst ${HOST2_6} \ proto esp spi ${SPI_1} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_1} 96 \ - enc 'cbc(des3_ede)' ${ENC_1} \ + auth-trunc 'hmac(sha1)' ${AUTH_1} 96 \ + enc 'cbc(aes)' ${ENC_1} \ sel src ${h1_6} dst ${h2_6} ${devarg} ip -6 -netns host2 xfrm state add src ${HOST1_6} dst ${HOST2_6} \ proto esp spi ${SPI_1} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_1} 96 \ - enc 'cbc(des3_ede)' ${ENC_1} \ + auth-trunc 'hmac(sha1)' ${AUTH_1} 96 \ + enc 'cbc(aes)' ${ENC_1} \ sel src ${h1_6} dst ${h2_6} ip -6 -netns host1 xfrm state add src ${HOST2_6} dst ${HOST1_6} \ proto esp spi ${SPI_2} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_2} 96 \ - enc 'cbc(des3_ede)' ${ENC_2} \ + auth-trunc 'hmac(sha1)' ${AUTH_2} 96 \ + enc 'cbc(aes)' ${ENC_2} \ sel src ${h2_6} dst ${h1_6} ${devarg} ip -6 -netns host2 xfrm state add src ${HOST2_6} dst ${HOST1_6} \ proto esp spi ${SPI_2} reqid 0 mode tunnel \ replay-window 4 replay-oseq 0x4 \ - auth-trunc 'hmac(md5)' ${AUTH_2} 96 \ - enc 'cbc(des3_ede)' ${ENC_2} \ + auth-trunc 'hmac(sha1)' ${AUTH_2} 96 \ + enc 'cbc(aes)' ${ENC_2} \ sel src ${h2_6} dst ${h1_6} }