All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH ima-evm-utils v4 00/17] address deprecated warnings
@ 2022-11-01 20:17 Mimi Zohar
  2022-11-01 20:17 ` [PATCH ima-evm-utils v4 01/17] Revert "Reset 'errno' after failure to open or access a file" Mimi Zohar
                   ` (16 more replies)
  0 siblings, 17 replies; 31+ messages in thread
From: Mimi Zohar @ 2022-11-01 20:17 UTC (permalink / raw)
  To: linux-integrity; +Cc: Mimi Zohar, Petr Vorel, Vitaly Chikunov, Stefan Berger

Between travis/ci and OpenSSL v3 a large number of deprecated warnings
are being emitted when compiling ima-evm-utils.  Start addressing these
deprecated warnings by replacing the low level SHA1 and HMAC calls with
the EVP_ functions.  IMA signature version 1 also uses low level calls,
but instead of fixing it, deprecate it as nobody should be using it
anyway.

OpenSSL v3 "engine" support is deprecated and replaced with "providers".
Engine support will continue to work for a while, but results in
deprecated declaration and other messages.  Define a "--disable-engine"
and the equivalent "--enable-engine=no" configuration option.

Changelog v4:
Based on Vitaly's comments:
- instead of setting errno to zero, define a macro to log a message
with the errno and reset errno.
- verify ENGINE_init symbol is defined in libcrypto.
- disable engine support if either OPENSSL_NO_DYNAMIC_ENGINE or
OPENSSL_NO_ENGINE variables are defined.
- Rename CONFIG_ENGINE to CONFIG_IMA_EVM_ENGINE

Changelog v3:
- Make the SM2/SM3 tests dependent on the OpenSSL v3, rather than
compiling OpenSSL v3, based on Vitaly's suggestion.
- Re-use the existing infrastructure for compiling OpenSSL to compile
OpenSSL without engine support.  ima-evm-utils compiles cleanly without
any deprecated messages.
- Instead of using the distro OpenSSL version on jammy, compile OpenSSL
to test building ima-evm-utils without OpenSSL engine support.
- Make sure the keyfile is a regular file before using it.
- Based on Vitaly's suggestion: undefine CONFIG_ENGINE when OpenSSL
engine support is not configured, run the tests normally without
checking whether engine support is configured.
- Add Stefan's Reviewed-by tags.

Changelog v2:
- Based on Vitaly's comments, base enabling engine support on
OPENSSL_NO_ENGINE/OPENSSL_NO_DYNAMIC_ENGINE support.  Also don't limit
disabling ima-evm-utils engine support to v3, make it generic.
- Added Stefan's Reviewed-by tags.

Changelog v1:
- Based on Stefan's comments, removed deprecated functions when not
used and added missing word. Updated the usage and options accordingly.
- Based on Vitaly's comments, explicitly require "--disable-engine"
configuration to compile ima-evm-utils without OpenSSL v3 engine support
and typo.
- Based on Petr's comments, addressed the "return 77" by removing it,
  updated the travis patch description, and added his Reviewed-by tags.

Mimi Zohar (17):
  Revert "Reset 'errno' after failure to open or access a file"
  log and reset 'errno' after failure to open non-critical files
  Log and reset 'errno' on lsetxattr failure
  travis: update dist=focal
  Update configure.ac to address a couple of obsolete warnings
  Deprecate IMA signature version 1
  Replace the low level SHA1 calls when calculating the TPM 1.2 PCRs
  Replace the low level HMAC calls when calculating the EVM HMAC
  Add missing EVP_MD_CTX_free() call in calc_evm_hash()
  Disable use of OpenSSL "engine" support
  Fix potential use after free in read_tpm_banks()
  Limit the file hash algorithm name length
  Missing template data size lower bounds checking
  Base sm2/sm3 test on openssl version installed
  Compile a newer version of OpenSSL
  Build OpenSSL without engine support
  Fix d2i_x509_fp failure

 .github/workflows/ci.yml  |  10 +-
 .travis.yml               |  10 +-
 acinclude.m4              |   2 +-
 build.sh                  |   8 ++
 configure.ac              |  16 ++-
 m4/manpage-docbook-xsl.m4 |   2 +-
 src/Makefile.am           |  18 +++
 src/evmctl.c              | 282 ++++++++++++++++++++++++++------------
 src/imaevm.h              |   6 +
 src/libimaevm.c           |  44 ++++--
 tests/install-openssl3.sh |   9 +-
 tests/sign_verify.test    |  25 ++--
 12 files changed, 311 insertions(+), 121 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2022-11-13 21:26 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 20:17 [PATCH ima-evm-utils v4 00/17] address deprecated warnings Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 01/17] Revert "Reset 'errno' after failure to open or access a file" Mimi Zohar
2022-11-01 21:46   ` Stefan Berger
2022-11-01 23:04     ` Mimi Zohar
2022-11-02  0:25       ` Stefan Berger
2022-11-03 13:54         ` Mimi Zohar
2022-11-03 14:32           ` Petr Vorel
2022-11-03 21:35             ` Mimi Zohar
2022-11-03 22:50               ` Vitaly Chikunov
2022-11-13 21:25                 ` Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 02/17] log and reset 'errno' after failure to open non-critical files Mimi Zohar
2022-11-02 21:02   ` Stefan Berger
2022-11-03  3:13     ` Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 03/17] Log and reset 'errno' on lsetxattr failure Mimi Zohar
2022-11-02 15:55   ` Stefan Berger
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 04/17] travis: update dist=focal Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 05/17] Update configure.ac to address a couple of obsolete warnings Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 06/17] Deprecate IMA signature version 1 Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 07/17] Replace the low level SHA1 calls when calculating the TPM 1.2 PCRs Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 08/17] Replace the low level HMAC calls when calculating the EVM HMAC Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 09/17] Add missing EVP_MD_CTX_free() call in calc_evm_hash() Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 10/17] Disable use of OpenSSL "engine" support Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 11/17] Fix potential use after free in read_tpm_banks() Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 12/17] Limit the file hash algorithm name length Mimi Zohar
2022-11-01 20:17 ` [PATCH ima-evm-utils v4 13/17] Missing template data size lower bounds checking Mimi Zohar
2022-11-01 20:18 ` [PATCH ima-evm-utils v4 14/17] Base sm2/sm3 test on openssl version installed Mimi Zohar
2022-11-01 21:25   ` Stefan Berger
2022-11-01 20:18 ` [PATCH ima-evm-utils v4 15/17] Compile a newer version of OpenSSL Mimi Zohar
2022-11-01 20:18 ` [PATCH ima-evm-utils v4 16/17] Build OpenSSL without engine support Mimi Zohar
2022-11-01 20:18 ` [PATCH ima-evm-utils v4 17/17] Fix d2i_x509_fp failure Mimi Zohar
2022-11-02  0:44   ` Stefan Berger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.