1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-04-28 06:33:36 +02:00

27 Commits

Author SHA1 Message Date
Petr Vorel
3b70893edf configure: Fix tss2-esys check
Check tss2-esys with Esys_Free() instead of Esys_PCR_Read().
That should be the newest dependency.

That means we depend on tss2-esys >= 2.1.0 instead of 2.0.0.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Bruno Meneguele <bmeneg@redhat.com>(Fedora,CentOS 8(RHEL actually))
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2020-08-18 17:18:52 -04:00
Mimi Zohar
79ab82f55f Rename "Changelog" to "NEWS"
autoconfig requires the existence of a "NEWS" file.  "git log" is a better
changelog, and "ChangeLog" is really condensed and suitable to be NEWS.
After renaming ChangeLog to NEWS, autoconfig complains about the missing
"ChangeLog" file.

Replacing the default automake GNU flavor with "foreign" removes the
requirement for defining the NEWS, COPYING, AUTHORS, ChangeLog, and
README files.

Reported-by: Petr Vorel <pvorel@suse.cz>
Suggested-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2020-07-22 22:14:11 -04:00
Mimi Zohar
f01c449a0c ima-evm-utils: Release version 1.3
Updated both the release and library (ABI change) versions.  See the
"Changelog" for a list of the new features, bug fixes, and code cleanup.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2020-07-21 18:39:17 -04:00
Petr Vorel
80d3fda608 ima-evm-utils: Check for tsspcrread in runtime
instead of checking in build time as it's runtime dependency.
Also log when tsspcrread not found to make debugging easier.

We search for tsspcrread unless there is tss2-esys with Esys_PCR_Read(),
thus pcr_none.c was dropped as unneeded.

file_exist(), tst_get_path() and MIN() taken from LTP project.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
[zohar@linux.ibm.com: added USE_FPRINTF definitions]
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2020-07-15 21:49:26 -04:00
Vitaly Chikunov
b6ff60e4fa ima-evm-utils: Add some tests for evmctl
Run `make check' to execute the tests.
This commit only adds ima_hash test.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2020-05-19 17:29:59 -04:00
Patrick Uiterwijk
03f99ea6d0 ima-evm-utils: Add support for Intel TSS2 for PCR reading
This patch makes it possible to use the Intel TSS2 for getting
PCR values from the SHA1/SHA256 banks on a TPM2.
It is somewhat naive as it doesn't use the multi-PCR selection
that TSS2 is capable of, that is for a future patch.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
[zohar@linux.ibm.com: added missing "stdint.h" in pcr_tsspcrread.c]
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2020-05-19 17:28:00 -04:00
Bruno E. O. Meneguele
e1bd9c9887 ima-evm-utils: fix trailing chars from configure script
Two chars were left in a AC_DEFINE() in configure.ac, leading to an error
message during ./configure call:

checking for tsspcrread... yes
./configure: line 9894: ],: command not found

Signed-off-by: Bruno E. O. Meneguele <bmeneg@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2019-07-30 07:14:18 -04:00
Mimi Zohar
515c99856e ima-evm-utils: Release version 1.2
Updated both the release and library (ABI change) versions.  See the
"Changelog" for a short list of the new features, bug fixes, and code
cleanup.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2019-07-26 07:42:17 -04:00
Mimi Zohar
31ceff7eb6 ima-evm-utils: use tsspcrread to read the TPM 2.0 PCRs
The kernel does not expose the crypto agile TPM 2.0 PCR banks to
userspace like it exposes PCRs for TPM 1.2.  As a result, a userspace
application is required to read PCRs.

This patch adds tsspcrread support for reading the TPM 2.0 PCRs.
tsspcrread is one application included in the ibmtss package.

Sample error messages:
Failed to read PCRs: (tsspcrread failed: No such file or directory)
Failed to read PCRs: (TSS_Dev_Open: Error opening /dev/tpmrm0)

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Bruno E. O. Meneguele <bmeneg@redhat.com>
2019-07-24 06:09:17 -04:00
Dmitry Eremin-Solenikov
b09a25690f ima-evm-utils: link to libcrypto instead of OpenSSL
There is no need to link to full libssl. evmctl uses functions from
libcrypto, so let's link only against that library.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2019-05-23 10:07:27 -04:00
Vitaly Chikunov
782224f33c ima-evm-utils: Rework openssl init
Remove deprecated call to OpenSSL_add_all_algorithms().
Allow to disable openssl config loading by evmctl via configure
`--disable-openssl-conf' option. Show status of that in configure.
Move config loading from libimaevm to evmctl.
Finish engine initialization properly by calling ENGINE_set_default(),
as suggested by James Bottomley.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2019-05-21 10:41:29 -04:00
Vitaly Chikunov
b628d8bfdb ima-evm-utils: Extract digest algorithms from hash_info.h
If configured with "--with-kernel-headers=PATH" try to extract hash
algorithms from "hash_info.h" from the kernel source tree or
kernel-headers package located in the specified path. (Otherwise, it
will be tried to get from the installed kernel.)

This also introduces two algorithm lists, one is built-in and another is
from the kernel source. (They should never contain conflicting algorithm
IDs by their append-only nature.) If the digest is not found in the
built-in list it will be searched in the list from kernel's
"hash_info.h".

This patch will allow evmctl to be just recompiled to work with digest
algorithms introduced in the newer kernels.

Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2019-04-03 16:47:37 -04:00
André Draszik
6aea54d2ad evmctl: use correct include for xattr.h
The xattr API/ABI is provided by both the c-library, as well as by the
libattr package. The c-library's header file is sys/xattr.h, whereas
libattr's header file can be found in attr/xattr.h.

Given none of the code here *links* against the libattr.so shared library, it
is wrong to *compile* against libattr's API (header file).

Doing so avoids confusion as to which xattr.h is used as the least problem,
and potential ABI differences as the worst problem due the mismatching header
file used.

So make sure we compile and link against the same thing, the c-library in
both cases.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2018-07-01 14:47:17 -04:00
Petr Vorel
5fa7d35de5 autotools: Try to find correct manpage stylesheet path
xslt docbook styles differ across distributions, which requires some
workarounds [1]. Try to check the manpage stylesheet path with
xmlcatalog and fallback to the original one.

Add option --with-xml-catalog to use non-default catalog.

+ remove trailing whitespace

[1] https://github.com/CESNET/ipfixcol/blob/master/base/m4/lbr_check_xsltproc.m4

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2018-05-07 07:51:32 -04:00
Mimi Zohar
c860e0d9bb ima-evm-utils: Release version 1.1
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2018-02-15 08:02:19 -05:00
Dmitry Kasatkin
4b56112c09 Release version 1.0
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@huawei.com>
2015-07-30 21:28:53 +03:00
Dmitry Kasatkin
3d9bdc1de2 Release version 0.9
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
2014-09-23 15:09:05 +03:00
Dmitry Kasatkin
7ece92b4e1 Release version 0.8
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
2014-05-05 10:01:26 +03:00
Dmitry Kasatkin
bed3cc06f1 Release new version v0.7
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
2014-02-17 16:29:20 +02:00
Dmitry Kasatkin
018495c87f Initial library skeleton
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
2014-01-17 18:43:44 +02:00
Dmitry Kasatkin
504e1d4013 Move spec file to packaging directory
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
2014-01-16 13:34:48 +02:00
Dmitry Kasatkin
f1ba3e7b45 Version 0.6 release
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
2013-08-28 16:37:52 +03:00
Dmitry Kasatkin
a58cd9f4af Remove test scripts
Test scripts are not used at all.
All needed information is in README.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
2012-09-10 15:17:42 +03:00
Dmitry Kasatkin
4ae323778e Version 0.3
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
2012-09-06 14:08:53 +03:00
Dmitry Kasatkin
76f3496455 evm-utils renamed to ima-evm-utils.
Version set to 0.2.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
2012-09-06 14:08:53 +03:00
Dmitry Kasatkin
ff071501d0 Added missing CFLAGS
Added missing CFLAGS

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
2012-09-06 14:08:52 +03:00
Dmitry Kasatkin
273701a5b2 evmctl - IMA/EVM control tool
evmctl provides signing support for IMA/EVM.
Functionality includes signing of file content (IMA), file metadata (EVM),
importing public keys into kernel keyring.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
2011-11-24 17:03:43 +02:00