From patchwork Fri Jul 31 18:24:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mimi Zohar X-Patchwork-Id: 11695323 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 B8490161F for ; Fri, 31 Jul 2020 18:24:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB1EF22B43 for ; Fri, 31 Jul 2020 18:24:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387758AbgGaSYm (ORCPT ); Fri, 31 Jul 2020 14:24:42 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:16080 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387716AbgGaSYl (ORCPT ); Fri, 31 Jul 2020 14:24:41 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06VIJJoo042268; Fri, 31 Jul 2020 14:24:38 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mndxwg55-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:37 -0400 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06VIL6ma046985; Fri, 31 Jul 2020 14:24:37 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mndxwg4h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:37 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06VIKCeJ031693; Fri, 31 Jul 2020 18:24:35 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03ams.nl.ibm.com with ESMTP id 32gcpx7j6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 18:24:34 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06VIOVAC29819208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jul 2020 18:24:31 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64A7B52050; Fri, 31 Jul 2020 18:24:31 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com.ibmuc.com (unknown [9.160.38.42]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9E0E05204E; Fri, 31 Jul 2020 18:24:29 +0000 (GMT) From: Mimi Zohar To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , Petr Vorel , Vitaly Chikunov , Bruno Meneguele , Mimi Zohar Subject: [ima-evm-utils: PATCH 1/5] ima-evm-utils: travis: define travis.yml Date: Fri, 31 Jul 2020 14:24:04 -0400 Message-Id: <20200731182408.696931-2-zohar@linux.ibm.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20200731182408.696931-1-zohar@linux.ibm.com> References: <20200731182408.696931-1-zohar@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-31_07:2020-07-31,2020-07-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 mlxscore=0 bulkscore=0 suspectscore=1 phishscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310135 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Initial travis.yml file without the "boot_aggregate" test. Signed-off-by: Mimi Zohar --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000000..bf287898221e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: C +addons: + apt: + packages: + - libkeyutils-dev + - libattr1-dev + - attr + - openssl + - libssl-dev + - asciidoc + - xsltproc + - docbook-xsl + - docbook-xml +script: + - autoreconf -i && ./configure && make -j$(nproc) && sudo make install && VERBOSE=1 make check TESTS="ima_hash.test sign_verify.test"; + + - tail -3 tests/ima_hash.log; + - tail -3 tests/sign_verify.log; From patchwork Fri Jul 31 18:24:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mimi Zohar X-Patchwork-Id: 11695321 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 921B41575 for ; Fri, 31 Jul 2020 18:24:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 83A9122B42 for ; Fri, 31 Jul 2020 18:24:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387790AbgGaSYm (ORCPT ); Fri, 31 Jul 2020 14:24:42 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:16120 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387758AbgGaSYl (ORCPT ); Fri, 31 Jul 2020 14:24:41 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06VIJGwV172567; Fri, 31 Jul 2020 14:24:38 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mpqxavvw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:37 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06VIK3w6176105; Fri, 31 Jul 2020 14:24:37 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mpqxavv6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:37 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06VIJuar031164; Fri, 31 Jul 2020 18:24:35 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 32gcpx7j6w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 18:24:35 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06VIOWQi36831274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jul 2020 18:24:33 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E119F52051; Fri, 31 Jul 2020 18:24:32 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com.ibmuc.com (unknown [9.160.38.42]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id BE47E5204F; Fri, 31 Jul 2020 18:24:31 +0000 (GMT) From: Mimi Zohar To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , Petr Vorel , Vitaly Chikunov , Bruno Meneguele Subject: [ima-evm-utils: PATCH 2/5] ima-evm-utils: travis: download, compile, and install a swTPM Date: Fri, 31 Jul 2020 14:24:05 -0400 Message-Id: <20200731182408.696931-3-zohar@linux.ibm.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20200731182408.696931-1-zohar@linux.ibm.com> References: <20200731182408.696931-1-zohar@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-31_07:2020-07-31,2020-07-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 clxscore=1015 bulkscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310135 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Verifying the "boot_aggregate" requires reading the TPM PCRs for each of the TPM banks. In test environments without a physical TPM, a software TPM may be used. Signed-off-by: Mimi Zohar --- .travis.yml | 2 ++ tests/install-swtpm.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100755 tests/install-swtpm.sh diff --git a/.travis.yml b/.travis.yml index bf287898221e..fa2a37625d52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,8 @@ addons: - xsltproc - docbook-xsl - docbook-xml +install: + - ./tests/install-swtpm.sh script: - autoreconf -i && ./configure && make -j$(nproc) && sudo make install && VERBOSE=1 make check TESTS="ima_hash.test sign_verify.test"; diff --git a/tests/install-swtpm.sh b/tests/install-swtpm.sh new file mode 100755 index 000000000000..071e9c9ae442 --- /dev/null +++ b/tests/install-swtpm.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -ex +wget https://sourceforge.net/projects/ibmswtpm2/files/ibmtpm1332.tar.gz/download +mkdir ibmtpm1332 +cd ibmtpm1332 +tar -xvzf ../download +cd src +make -j$(nproc) +sudo cp tpm_server /usr/local/bin/ +cd ../.. From patchwork Fri Jul 31 18:24:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mimi Zohar X-Patchwork-Id: 11695325 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 7D384138C for ; Fri, 31 Jul 2020 18:24:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7049022BEA for ; Fri, 31 Jul 2020 18:24:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387716AbgGaSYn (ORCPT ); Fri, 31 Jul 2020 14:24:43 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46832 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387705AbgGaSYn (ORCPT ); Fri, 31 Jul 2020 14:24:43 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06VILxXr082527; Fri, 31 Jul 2020 14:24:38 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 32mr22rpx3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:38 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06VIM0IK082573; Fri, 31 Jul 2020 14:24:38 -0400 Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 32mr22rpwm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:38 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06VIM1j1028318; Fri, 31 Jul 2020 18:24:36 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma06fra.de.ibm.com with ESMTP id 32jgvptnhc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 18:24:36 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06VIN8Ot57999770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jul 2020 18:23:08 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED3545204E; Fri, 31 Jul 2020 18:24:33 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com.ibmuc.com (unknown [9.160.38.42]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1992A52051; Fri, 31 Jul 2020 18:24:32 +0000 (GMT) From: Mimi Zohar To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , Petr Vorel , Vitaly Chikunov , Bruno Meneguele Subject: [ima-evm-utils: PATCH 3/5] ima-evm-utils: travis: dependency on TSS for initializing software TPM Date: Fri, 31 Jul 2020 14:24:06 -0400 Message-Id: <20200731182408.696931-4-zohar@linux.ibm.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20200731182408.696931-1-zohar@linux.ibm.com> References: <20200731182408.696931-1-zohar@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-31_06:2020-07-31,2020-07-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxlogscore=982 suspectscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310133 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Verifying the "boot_aggregate" requires reading the TPM PCRs for each of the TPM banks. In test environments without a physical TPM, a software TPM may be used, but requires initializing the TPM PCRs. By walking and replaying the TPM event log, a software TPM may be properly initialized. Signed-off-by: Mimi Zohar --- .travis.yml | 4 +++- tests/install-tss.sh | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 tests/install-tss.sh diff --git a/.travis.yml b/.travis.yml index fa2a37625d52..0a3476572f74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,10 @@ addons: - docbook-xml install: - ./tests/install-swtpm.sh + - ./tests/install-tss.sh script: - - autoreconf -i && ./configure && make -j$(nproc) && sudo make install && VERBOSE=1 make check TESTS="ima_hash.test sign_verify.test"; + - autoreconf -i && ./configure && make -j$(nproc) && sudo make install && VERBOSE=1 make check; - tail -3 tests/ima_hash.log; - tail -3 tests/sign_verify.log; + - tail -3 tests/boot_aggregate.log; diff --git a/tests/install-tss.sh b/tests/install-tss.sh new file mode 100755 index 000000000000..c9c179eee6a8 --- /dev/null +++ b/tests/install-tss.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -ex +git clone https://git.code.sf.net/p/ibmtpm20tss/tss +cd tss +autoreconf -i && ./configure --disable-tpm-1.2 --disable-hwtpm && make -j$(nproc) && sudo make install +cd .. +rm -rf tss From patchwork Fri Jul 31 18:24:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mimi Zohar X-Patchwork-Id: 11695327 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 1F00B1575 for ; Fri, 31 Jul 2020 18:24:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10C0722B42 for ; Fri, 31 Jul 2020 18:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387791AbgGaSYo (ORCPT ); Fri, 31 Jul 2020 14:24:44 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:4158 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387705AbgGaSYo (ORCPT ); Fri, 31 Jul 2020 14:24:44 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06VIJ8Lo055075; Fri, 31 Jul 2020 14:24:40 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mq62j64n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:40 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06VIJEKO055300; Fri, 31 Jul 2020 14:24:40 -0400 Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mq62j641-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:39 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06VIKe03028933; Fri, 31 Jul 2020 18:24:37 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma02fra.de.ibm.com with ESMTP id 32gcq0vn8k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 18:24:37 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06VIOZIF11207102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jul 2020 18:24:35 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6456E52052; Fri, 31 Jul 2020 18:24:35 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com.ibmuc.com (unknown [9.160.38.42]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3095352051; Fri, 31 Jul 2020 18:24:34 +0000 (GMT) From: Mimi Zohar To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , Petr Vorel , Vitaly Chikunov , Bruno Meneguele Subject: [ima-evm-utils: PATCH 4/5] ima-evm-utils: travis: support tpm2-tss Date: Fri, 31 Jul 2020 14:24:07 -0400 Message-Id: <20200731182408.696931-5-zohar@linux.ibm.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20200731182408.696931-1-zohar@linux.ibm.com> References: <20200731182408.696931-1-zohar@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-31_07:2020-07-31,2020-07-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 spamscore=0 suspectscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310135 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Running the "boot_aggregate" test without a physical TPM, requires installing and initializing a software TPM. For now, use the same method of initializing the TPM, based on the IBM tss, for both the IBM and Intel's tss. Build both the IBM and INTEL's tss. Signed-off-by: Mimi Zohar --- .travis.yml | 17 ++++++++++++++++- tests/install-tpm2-tss.sh | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 tests/install-tpm2-tss.sh diff --git a/.travis.yml b/.travis.yml index 0a3476572f74..11a827c02f0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,12 +11,27 @@ addons: - xsltproc - docbook-xsl - docbook-xml +matrix: + include: + - env: TSS=ibmtss + - env: TSS=tpm2-tss install: + - if [ "${TSS}" = "tpm2-tss" ]; then + sudo apt-get install lcov pandoc autoconf-archive liburiparser-dev; + sudo apt-get install libdbus-1-dev libglib2.0-dev dbus-x11 libgcrypt-dev; + sudo apt-get install libssl-dev doxygen libjson-c-dev; + sudo apt-get install libini-config-dev libltdl-dev; + sudo apt-get install uuid-dev libcurl4-openssl-dev; + ./tests/install-tpm2-tss.sh; + fi - ./tests/install-swtpm.sh - ./tests/install-tss.sh + script: + - export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib; + - export PATH=$PATH:/usr/local/bin; - autoreconf -i && ./configure && make -j$(nproc) && sudo make install && VERBOSE=1 make check; - tail -3 tests/ima_hash.log; - tail -3 tests/sign_verify.log; - - tail -3 tests/boot_aggregate.log; + - tail -20 tests/boot_aggregate.log; diff --git a/tests/install-tpm2-tss.sh b/tests/install-tpm2-tss.sh new file mode 100755 index 000000000000..7a71b57a8729 --- /dev/null +++ b/tests/install-tpm2-tss.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +git clone https://github.com/tpm2-software/tpm2-tss.git +cd tpm2-tss +./bootstrap +./configure +make -j$(nproc) +sudo make install +sudo ldconfig +cd .. +rm -rf tpm2-tss + +git clone https://github.com/tpm2-software/tpm2-tools.git +cd tpm2-tools +./bootstrap && ./configure --prefix=/usr +make -j$(nproc) +sudo make install +cd .. +rm -rf tpm2-tools From patchwork Fri Jul 31 18:24:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mimi Zohar X-Patchwork-Id: 11695329 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 1F26C1575 for ; Fri, 31 Jul 2020 18:24:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 114A222BEA for ; Fri, 31 Jul 2020 18:24:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387705AbgGaSYq (ORCPT ); Fri, 31 Jul 2020 14:24:46 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39506 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387690AbgGaSYq (ORCPT ); Fri, 31 Jul 2020 14:24:46 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06VIJND7023365; Fri, 31 Jul 2020 14:24:42 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mp9ykj2c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:42 -0400 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06VIJTpr023615; Fri, 31 Jul 2020 14:24:41 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 32mp9ykj1g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 14:24:41 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06VIGUSV019553; Fri, 31 Jul 2020 18:24:39 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06ams.nl.ibm.com with ESMTP id 32gcqgqhqh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 Jul 2020 18:24:39 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06VIOb4931588750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 31 Jul 2020 18:24:37 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2725252050; Fri, 31 Jul 2020 18:24:37 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com.ibmuc.com (unknown [9.160.38.42]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id BCC465204E; Fri, 31 Jul 2020 18:24:35 +0000 (GMT) From: Mimi Zohar To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , Petr Vorel , Vitaly Chikunov , Bruno Meneguele Subject: [ima-evm-utils: PATCH 5/5] ima-evm-utils: travis: openssl gost engine Date: Fri, 31 Jul 2020 14:24:08 -0400 Message-Id: <20200731182408.696931-6-zohar@linux.ibm.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: <20200731182408.696931-1-zohar@linux.ibm.com> References: <20200731182408.696931-1-zohar@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-31_07:2020-07-31,2020-07-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 clxscore=1015 bulkscore=0 malwarescore=0 suspectscore=0 mlxlogscore=870 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007310135 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org The openssl version on travis doesn't have gost openssl engine support. Download from source, rebuild and install local version. Signed-off-by: Mimi Zohar Signed-off-by: Mimi Zohar --- .travis.yml | 7 +++++++ tests/install-gost-engine.sh | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100755 tests/install-gost-engine.sh diff --git a/.travis.yml b/.travis.yml index 11a827c02f0a..f5fb2c1da448 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,13 @@ matrix: include: - env: TSS=ibmtss - env: TSS=tpm2-tss + +before_install: + - if [ "${SSL}" = "openssl" ]; then + ./tests/install-gost-engine.sh; + openssl version; + fi + install: - if [ "${TSS}" = "tpm2-tss" ]; then sudo apt-get install lcov pandoc autoconf-archive liburiparser-dev; diff --git a/tests/install-gost-engine.sh b/tests/install-gost-engine.sh new file mode 100755 index 000000000000..01bcf2c3bc21 --- /dev/null +++ b/tests/install-gost-engine.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +openssl version + +git clone https://github.com/gost-engine/engine.git +cd engine +#cmake -DOPENSSL_INCLUDE_DIR=/usr/local/include/openssl -DOPENSSL_SSL_LIBRARY=/usr/local/lib64/libss.so -DOPENSSL_CRYPTO_LIBRARY=/usr/local/lib64/libcrypto.so -DOPENSSL_ENGINES_DIR=/usr/local/lib64/engines-1.1 . +cmake . +sudo make install +cd ..