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/src/crypto.erl | |
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/src/crypto.erl')
-rw-r--r-- | lib/crypto/src/crypto.erl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 04b2f62266..a99ab2faea 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1058,8 +1058,21 @@ ng_crypto_one_time_nif(_Cipher, _Key, _IVec, _Data, _EncryptFlg) -> ?nif_stub. %%%---------------------------------------------------------------- %%% Cipher aliases %%% -prepend_cipher_aliases(L) -> - [des3_cbc, des_ede3, des_ede3_cbf, des3_cbf, des3_cfb, aes_cbc128, aes_cbc256 | L]. +prepend_cipher_aliases(L0) -> + L = + case lists:member(des_ede3_cbc, L0) of + true -> + [des3_cbc, des_ede3, des_ede3_cbf, des3_cbf, des3_cfb | L0]; + false -> + L0 + end, + case lists:member(aes_128_cbc, L0) of + true -> + [aes_cbc128, aes_cbc256 | L]; + false -> + L + end. + %%%---- des_ede3_cbc alias(des3_cbc) -> des_ede3_cbc; |