diff options
author | Hans Nilsson <[email protected]> | 2019-04-08 14:33:12 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2019-04-10 10:38:10 +0200 |
commit | 39e7ecc0b3c5cbe529093f126189eadbf83d3a80 (patch) | |
tree | 88b0d95bde8a633c6fbb57b7dcc3f2f4a6faee6a /lib/crypto/test | |
parent | f088a25bebcb74668dac21dc3b686fc2bea4502e (diff) | |
download | otp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.tar.gz otp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.tar.bz2 otp-39e7ecc0b3c5cbe529093f126189eadbf83d3a80.zip |
crypto: Obey compile flags for no DSA, BF, DES, DH
Diffstat (limited to 'lib/crypto/test')
-rw-r--r-- | lib/crypto/test/engine_SUITE.erl | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl index 3416fbd78d..41cd132734 100644 --- a/lib/crypto/test/engine_SUITE.erl +++ b/lib/crypto/test/engine_SUITE.erl @@ -148,8 +148,21 @@ end_per_group(_, Config) -> end. %%-------------------------------------------------------------------- -init_per_testcase(_Case, Config) -> - Config. +init_per_testcase(Case, Config) -> + case string:tokens(atom_to_list(Case),"_") of + ["sign","verify",Type|_] -> + skip_if_unsup(list_to_atom(Type), Config); + + ["priv","encrypt","pub","decrypt",Type|_] -> + skip_if_unsup(list_to_atom(Type), Config); + + ["get","pub","from","priv","key",Type|_] -> + skip_if_unsup(list_to_atom(Type), Config); + + _ -> + Config + end. + end_per_testcase(_Case, _Config) -> ok. @@ -851,6 +864,19 @@ get_pub_from_priv_key_ecdsa(Config) -> %%%================================================================ %%% Help for engine_stored_pub_priv_keys* test cases %%% +skip_if_unsup(Type, Config) -> + case pkey_supported(Type) of + false -> + {skip, "Unsupported in this cryptolib"}; + true -> + Config + end. + + +pkey_supported(Type) -> + lists:member(Type, proplists:get_value(public_keys, crypto:supports(), [])). + + load_storage_engine(Config) -> load_storage_engine(Config, []). |