diff options
author | Magnus Henoch <[email protected]> | 2016-09-08 15:49:13 +0100 |
---|---|---|
committer | Magnus Henoch <[email protected]> | 2016-09-14 14:31:31 +0100 |
commit | 6b4cf6c5759d1f1f952708ab191f563175950aa0 (patch) | |
tree | b6fe7af2e460b4c91c1f0dc144397e9257b71e7f /lib/public_key/test/pbe_SUITE.erl | |
parent | 176b7c94e4146a65ccd2bd729d58487098dddd9c (diff) | |
download | otp-6b4cf6c5759d1f1f952708ab191f563175950aa0.tar.gz otp-6b4cf6c5759d1f1f952708ab191f563175950aa0.tar.bz2 otp-6b4cf6c5759d1f1f952708ab191f563175950aa0.zip |
Fix compilation when OpenSSL doesn't support RC2
When OpenSSL has been configured with the "no-rc2" option, the header
file rc2.h doesn't exist, and neither does the function EVP_rc2_cbc.
Let's handle those by checking whether OPENSSL_NO_RC2 is defined.
Also update pbe_SUITE, which uses RC2-CBC in one of the tests.
Diffstat (limited to 'lib/public_key/test/pbe_SUITE.erl')
-rw-r--r-- | lib/public_key/test/pbe_SUITE.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/public_key/test/pbe_SUITE.erl b/lib/public_key/test/pbe_SUITE.erl index 004eaefc27..44caf479e5 100644 --- a/lib/public_key/test/pbe_SUITE.erl +++ b/lib/public_key/test/pbe_SUITE.erl @@ -219,7 +219,12 @@ pbes2() -> pbes2(Config) when is_list(Config) -> decode_encode_key_file("pbes2_des_cbc_enc_key.pem", "password", "DES-CBC", Config), decode_encode_key_file("pbes2_des_ede3_cbc_enc_key.pem", "password", "DES-EDE3-CBC", Config), - decode_encode_key_file("pbes2_rc2_cbc_enc_key.pem", "password", "RC2-CBC", Config). + case lists:member(rc2_cbc, proplists:get_value(ciphers, crypto:supports())) of + true -> + decode_encode_key_file("pbes2_rc2_cbc_enc_key.pem", "password", "RC2-CBC", Config); + false -> + ok + end. check_key_info(#'PrivateKeyInfo'{privateKeyAlgorithm = #'PrivateKeyInfo_privateKeyAlgorithm'{algorithm = ?rsaEncryption}, |