diff options
author | Lukas Larsson <[email protected]> | 2012-08-30 15:40:32 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2012-08-30 15:40:32 +0200 |
commit | 3f959449578ce652aad353631f3c3c51aa7b5d50 (patch) | |
tree | 696e7cccf5a9d9b1515323951e8e880311e8619b /lib/crypto/test/crypto_SUITE.erl | |
parent | c7787af81f8cf4ae2991ee5c032fb4a7cd29d29d (diff) | |
parent | 24f0d49642ecc0cc566055f1c5b8c49e65c42537 (diff) | |
download | otp-3f959449578ce652aad353631f3c3c51aa7b5d50.tar.gz otp-3f959449578ce652aad353631f3c3c51aa7b5d50.tar.bz2 otp-3f959449578ce652aad353631f3c3c51aa7b5d50.zip |
Merge branch 'maint'
* maint:
Document that CTHs can get fail/skip as Config
Ignore calls to dialyzer_timing when checking deprecated
Do not verify del_path as it is not always there
Fix broken links
Generate <a name="name"> tags in edoc xml headings
Fix compile warning
crypto: Fix buffer overflow bug in rsa_sign
crypto: Skip some tests if openssl lib < 0.9.8
Fix boken spec
Diffstat (limited to 'lib/crypto/test/crypto_SUITE.erl')
-rw-r--r-- | lib/crypto/test/crypto_SUITE.erl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 1b5bc44dde..7ac693f371 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -349,6 +349,14 @@ hmac_update_sha256(doc) -> hmac_update_sha256(suite) -> []; hmac_update_sha256(Config) when is_list(Config) -> + case openssl_version() of + V when V < 16#908000 -> + {skipped,"OpenSSL version too old"}; + _ -> + hmac_update_sha256_do() + end. + +hmac_update_sha256_do() -> ?line Key = hexstr2bin("00010203101112132021222330313233" "04050607141516172425262734353637" "08090a0b18191a1b28292a2b38393a3b" @@ -368,6 +376,14 @@ hmac_update_sha512(doc) -> hmac_update_sha512(suite) -> []; hmac_update_sha512(Config) when is_list(Config) -> + case openssl_version() of + V when V < 16#908000 -> + {skipped,"OpenSSL version too old"}; + _ -> + hmac_update_sha512_do() + end. + +hmac_update_sha512_do() -> ?line Key = hexstr2bin("00010203101112132021222330313233" "04050607141516172425262734353637" "08090a0b18191a1b28292a2b38393a3b" @@ -406,6 +422,14 @@ hmac_rfc4231(doc) -> hmac_rfc4231(suite) -> []; hmac_rfc4231(Config) when is_list(Config) -> + case openssl_version() of + V when V < 16#908000 -> + {skipped,"OpenSSL version too old"}; + _ -> + hmac_rfc4231_do() + end. + +hmac_rfc4231_do() -> %% Test Case 1 Case1Key = binary:copy(<<16#0b>>, 20), Case1Data = <<"Hi There">>, @@ -1927,3 +1951,11 @@ my_dss_sign(Data,Key) -> ?line S3 = crypto:dss_sign(none, crypto:sha(Raw), Key), [S1,S2,S3]. +openssl_version() -> + case crypto:info_lib() of + [{<<"OpenSSL">>,LibVer,_}] when is_integer(LibVer) -> + LibVer; + _ -> + undefined + end. + |