From patchwork Sat Sep 12 19:36:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Chikunov X-Patchwork-Id: 11772015 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A4CB16C0 for ; Sat, 12 Sep 2020 19:36:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2ADD7221E3 for ; Sat, 12 Sep 2020 19:36:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725838AbgILTg1 (ORCPT ); Sat, 12 Sep 2020 15:36:27 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:45562 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725897AbgILTgV (ORCPT ); Sat, 12 Sep 2020 15:36:21 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id DCC0072CA54; Sat, 12 Sep 2020 22:36:19 +0300 (MSK) Received: from beacon.altlinux.org (unknown [83.220.44.62]) by imap.altlinux.org (Postfix) with ESMTPSA id 97ABE4A4A16; Sat, 12 Sep 2020 22:36:19 +0300 (MSK) From: Vitaly Chikunov To: Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org Cc: Mimi Zohar Subject: [PATCH 2/2] ima-evm-utils: Add test for sigfile reading Date: Sat, 12 Sep 2020 22:36:14 +0300 Message-Id: <20200912193614.12903-2-vt@altlinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200912193614.12903-1-vt@altlinux.org> References: <20200912193614.12903-1-vt@altlinux.org> MIME-Version: 1.0 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Test reading of detached IMA signature (--sigfile). Suggested-by: Mimi Zohar Signed-off-by: Vitaly Chikunov --- tests/sign_verify.test | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/sign_verify.test b/tests/sign_verify.test index 118c3f6..cddeb15 100755 --- a/tests/sign_verify.test +++ b/tests/sign_verify.test @@ -93,7 +93,8 @@ _test_sigfile() { return "$FAIL" fi - rm "$file_sig" "$file_sig2" + # Leave '$file_sig' for ima_verify --sigfile test. + rm "$file_sig2" } # Run single sign command @@ -254,9 +255,12 @@ sign_verify() { # Normal verify with proper key should pass expect_pass check_verify + expect_pass check_verify OPTS="--sigfile" # Multiple files and some don't verify expect_fail check_verify FILE="/dev/null $file" + + rm "$FILE.sig" fi TYPE=evm