1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-04-27 14:22:31 +02:00

24 Commits

Author SHA1 Message Date
Petr Vorel
80442de4dd github: travis: Remove COMPILE_SSL from tumbleweed
Distro has openSSL 3.0.7, no need to compile own openSSL 3.x.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2023-02-15 16:48:52 -05:00
Mimi Zohar
297d01bdb6 Build OpenSSL without engine support
Fix COMPILE_SSL to build for the proper architecture, link with the
appropriate library, and set up library path for evmctl.

Compile OpenSSL with "no-engine" and "no-dynamic-engine" support.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-11-13 16:56:18 -05:00
Mimi Zohar
abf7b5e236 Compile a newer version of OpenSSL
With the distros shipping OpenSSL 3 with engine support, the original
purpose for compiling OpenSSL 3 to test sm2/sm3 is no longer necessary
and could be removed.  Or, it could be re-purposed for building OpenSSL
without engine support, which is needed for testing.

For both travis and github actions, update openssl-3.0.0-beta1 with
openssl-3.0.5.

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-11-13 16:56:18 -05:00
Mimi Zohar
f8c9621d88 travis: update dist=focal
Although Github Actions is available on Github Enterprise Server 3.x
single server edition, as well as the unpaid version, it is not
available in Github Enterprise Server 3.x cluster edition[1].

Continue updating travis.yml.

[1] https://docs.github.com/en/enterprise-server@3.0/admin/release-notes#github-packages

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-11-13 16:56:18 -05:00
Petr Vorel
8f1e5224e6 ci/ubuntu: impish -> jammy
Ubuntu 21.10 impish EOL in 2022-04 (next month).
Replace it with the latest stable release (EOL 2027-04).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-08-29 17:55:57 -04:00
Mimi Zohar
eb956b8d35 travis: install fuse-overlayfs before podman
WARN[0000] Error validating CNI config file /home/travis/.config/cni/net.d/87-podman.conflist: [failed to find plugin "bridge" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin] failed to find plugin "portmap" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin] failed to find plugin "firewall" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin] failed to find plugin "tuning" in path [/usr/local/libexec/cni /usr/libexec/cni /usr/local/lib/cni /usr/lib/cni /opt/cni/bin]]

Based on https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md, install
fuse-overlayfs.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-06-14 07:53:27 -04:00
Mimi Zohar
170be44a7b travis: include CentOS stream 8
Replace CentOS 8 with CentOS stream 8.
Use podman for both CentOS 7 & 8.

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-03-24 10:34:23 -04:00
Petr Vorel
37317838b4 ci: Replace groovy -> impish
in both GitHub Actions and Travis.

groovy is EOL, which is probably the reason why it's archives has been
removed:

Ign:1 http://security.ubuntu.com/ubuntu groovy-security InRelease
Ign:2 http://archive.ubuntu.com/ubuntu groovy InRelease
Err:3 http://security.ubuntu.com/ubuntu groovy-security Release
  404  Not Found [IP: 91.189.91.39 80]
Ign:4 http://archive.ubuntu.com/ubuntu groovy-updates InRelease
Ign:5 http://archive.ubuntu.com/ubuntu groovy-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu groovy Release
  404  Not Found [IP: 91.189.88.142 80]
Err:7 http://archive.ubuntu.com/ubuntu groovy-updates Release
  404  Not Found [IP: 91.189.88.142 80]
Err:8 http://archive.ubuntu.com/ubuntu groovy-backports Release
  404  Not Found [IP: 91.189.88.142 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu groovy-security Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu groovy Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu groovy-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu groovy-backports Release' does not have a Release file.

Using impish requires to use workaround to avoid apt asking to
interactively configure tzdata.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2022-01-19 16:34:42 -05:00
Mimi Zohar
f9b805fabc travis: use alt:sisyphus from docker.io
Instead of returning an image, it prompts for a response.  Hardcode
to use docker.io.

 Please select an image:
  ▸ docker.io/library/alt:sisyphus
    quay.io/alt:sisyphus

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-11-03 14:07:21 -04:00
Mimi Zohar
1a9472a09c travis: Fix fedora:latest, alpine:latest, and alt:sisyphus
As expected, for the same reasons as commit 6287cb76d186 ("travis: Fix
openSUSE Tumbleweed"), replace using docker with podman, but now use
crun.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-11-01 14:23:38 -04:00
Mimi Zohar
9171c1ce43 travis: switch to using crun for podman
Fix for:

"container_linux.go:367: starting container process caused: error
adding seccomp filter rule for syscall bdflush: permission denied":
OCI permission denied"

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-10-28 16:07:23 -04:00
Tianjia Zhang
a5f5dd7c8e ima-evm-utils: Support SM2/3 algorithm for sign and verify
Keep in sync with the kernel IMA, IMA signature tool supports SM2/3
algorithm combination. Because in the current version of OpenSSL 1.1.1,
the SM2 algorithm and the public key using the EC algorithm share the
same ID 'EVP_PKEY_EC', and the specific algorithm can only be
distinguished by the curve name used. This patch supports this feature.

Secondly, the openssl 1.1.1 tool does not fully support the signature
of SM2/3 algorithm combination, so the openssl3 tool is used in the
test case, and there is no this problem with directly calling the
openssl 1.1.1 API in evmctl.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
[zohar@linux.ibm.com: "COMPILE_SSL: " -> "COMPILE_SSL=" in .travis.yml
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-07-21 13:15:02 -04:00
Vitaly Chikunov
58a84044fd CI: Add support for ALT Linux
Build on Sisyphus branch which is bleeding edge repository.
Package manager is apt-rpm (not APT as it may look from the scripts).

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-07-16 07:43:37 -04:00
Vitaly Chikunov
a7dd075ef7 CI: Do not install swtpm if it cannot work anyway
Do not need to waste CPU cycles and time to install swtpm in CI
container if distribution does not have tssstartup, because we will
be not able to start it.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-07-13 21:02:29 -04:00
Petr Vorel
28dd7d4b06 CI: Rename travis script directory
This is a preparation for adding GitHub Actions support.

Also run from root directory. It's a bit confusing to run from
travis directory.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-06-24 10:39:22 -04:00
Petr Vorel
6287cb76d1 travis: Fix openSUSE Tumbleweed
openSUSE Tumbleweed build fails due broken permission detection due
faccessat2() incompatibility in libseccomp/runc used in old docker with
old kernel on Ubuntu Focal on hosts in Travis CI together with guests
with the newest glibc 2.33.

Fixing Tumbleweed required switch to podman and downloading newest runc
release (v1.0.0-rc93) which contains the fix [1], because proposed glibc
fix [2] aren't going to merged to upstream [3] nor to Tumbleweed
downstream glibc [4].

Sooner or later it will be required for more distros (Fedora, Debian
Ubuntu), but don't waste build time until required.

[1] https://github.com/opencontainers/runc/pull/2750
[2] https://sourceware.org/pipermail/libc-alpha/2020-November/119955.html
[3] https://sourceware.org/pipermail/libc-alpha/2020-November/119978.html
[4] https://bugzilla.opensuse.org/1182451

Signed-off-by: Petr Vorel <pvorel@suse.cz>
[zohar@linux.ibm.com: actually remove sudo, as per Changelog]
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-04-15 11:16:56 -04:00
Petr Vorel
056a7d284c travis: Use Ubuntu 20.10 groovy
Eoan is failing:

E: The repository 'http://security.ubuntu.com/ubuntu eoan-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

And 20.04 LTS focal in Travis is still fails on debconf issue
("debconf: unable to initialize frontend: Dialog")

Old 16.04 LTS xenial is still supported and working in Travis,
thus move to new groovy gives us good coverage both old and new releases.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-01-06 08:41:44 -05:00
Mimi Zohar
f831508297 Install the swtpm package, if available
The "boot_aggregate.test" requires either a hardware or software TPM.
Support using the swtpm, if packaged for the distro, in addition to
tpm_server.

Note: Some travis/<distro>.sh scripts are links to other scripts.
Don't fail the build of the linked script if the swtpm package doesn't
exist.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Bruno Meneguele <bmeneg@redhat.com>
2020-08-18 17:22:03 -04:00
Petr Vorel
6c78911350 travis: Switch to docker based builds
This requires to have distro specific install scripts and build.sh
script.

For now ibmswtpm2 is compiled just for native builds (depends on gcc,
compiled natively). libtmps/swtpm could be used.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Bruno Meneguele <bmeneg@redhat.com>(Fedora,CentOS 8(RHEL actually))
[zohar@linux.ibm.com: removed debugging in travis/fedora.sh]
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2020-08-18 17:21:39 -04:00
Mimi Zohar
1b5146db99 travis: define dist as "bionic"
Default to using "bionic".

Mimi Zohar <zohar@linux.ibm.com>
2020-08-10 15:35:36 -04:00
Mimi Zohar
3ff5d99edc travis: support tpm2-tss
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 <zohar@linux.ibm.com>
2020-08-04 13:53:07 -04:00
Mimi Zohar
f2fe592907 travis: dependency on TSS for initializing software TPM
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 <zohar@linux.ibm.com>
2020-08-04 13:53:07 -04:00
Mimi Zohar
9cd7edf1e0 travis: download, compile, and install a swTPM
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 <zohar@linux.ibm.com>
2020-08-04 13:53:07 -04:00
Mimi Zohar
d5aed92be4 travis: define travis.yml
Initial travis.yml file without the "boot_aggregate" test.

Signed-off-by: Mimi Zohar <zoahr@linux.ibm.com>
2020-08-04 13:53:07 -04:00