diff options
author | Clemens Lang <cllang@redhat.com> | 2022-06-21 19:00:47 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-09-22 13:29:02 +0900 |
commit | 1524b60a7ccc17fb82e91b90236a88a27b113175 (patch) | |
tree | 6ade16274bc6eec37e050bd61f2af0ed860c68b5 | |
parent | 16ac1850b854abe9b6f693a489ceeb0048777bfa (diff) | |
download | libgcrypt-1524b60a7ccc17fb82e91b90236a88a27b113175.tar.gz |
build: Skip PK-specific tests if algo is disabled
* configure.ac: Define AM_CONDITIONALs for USE_DSA, USE_RSA,
USE_ELGAMAL, USE_ECC so Makefiles can depend on them.
* tests/Makefile.am: Skip tests that test only one public key algorithm
if that algorithm is disabled.
--
Cherry-pick master commit of:
56000fb5c42f01f1ced4e3dd0bb30662c0ba87c3
Skip building and running tests that are specific for a public key
algorithm if that algorithm was disabled using the
--enable-pubkey-ciphers configure option.
GnuPG-bug-id: 6048
Signed-off-by: Clemens Lang <cllang@redhat.com>
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | tests/Makefile.am | 19 |
2 files changed, 19 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 13e39f20..3c0c9409 100644 --- a/configure.ac +++ b/configure.ac @@ -2802,24 +2802,28 @@ if test "$found" = "1" ; then fi LIST_MEMBER(dsa, $enabled_pubkey_ciphers) +AM_CONDITIONAL(USE_DSA, [test "$found" = "1"]) if test "$found" = "1" ; then GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS dsa.lo" AC_DEFINE(USE_DSA, 1, [Defined if this module should be included]) fi LIST_MEMBER(rsa, $enabled_pubkey_ciphers) +AM_CONDITIONAL(USE_RSA, [test "$found" = "1"]) if test "$found" = "1" ; then GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS rsa.lo" AC_DEFINE(USE_RSA, 1, [Defined if this module should be included]) fi LIST_MEMBER(elgamal, $enabled_pubkey_ciphers) +AM_CONDITIONAL(USE_ELGAMAL, [test "$found" = "1"]) if test "$found" = "1" ; then GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS elgamal.lo" AC_DEFINE(USE_ELGAMAL, 1, [Defined if this module should be included]) fi LIST_MEMBER(ecc, $enabled_pubkey_ciphers) +AM_CONDITIONAL(USE_ECC, [test "$found" = "1"]) if test "$found" = "1" ; then GCRYPT_PUBKEY_CIPHERS="$GCRYPT_PUBKEY_CIPHERS \ ecc.lo ecc-curves.lo ecc-misc.lo \ diff --git a/tests/Makefile.am b/tests/Makefile.am index e6953fd3..f65725bc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -23,11 +23,22 @@ # the driver is only used for cross-compiling. tests_bin = \ version t-secmem mpitests t-sexp t-convert \ - t-mpi-bit t-mpi-point curves t-lock \ + t-mpi-bit t-mpi-point t-lock \ prime basic keygen pubkey hmac hashtest t-kdf keygrip \ - fips186-dsa aeswrap pkcs1v2 random dsa-rfc6979 \ - t-dsa t-ecdsa t-rsa-pss t-rsa-15 \ - t-ed25519 t-cv25519 t-x448 t-ed448 + aeswrap random + +if USE_RSA +tests_bin += pkcs1v2 t-rsa-pss t-rsa-15 +endif + +if USE_DSA +tests_bin += fips186-dsa dsa-rfc6979 t-dsa +endif + +if USE_ECC +tests_bin += curves t-ecdsa t-ed25519 t-cv25519 t-x448 t-ed448 +endif + tests_bin_last = benchmark bench-slope |