aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/src/crypto.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-11-27 18:00:30 +0100
committerSverker Eriksson <[email protected]>2013-11-27 18:00:30 +0100
commit998d043865059dcf7f5055a62586cc1420c221b9 (patch)
treeb9a1e6f399ccddea94c15230916925b3f4896daf /lib/crypto/src/crypto.erl
parent9f2cdf704fa0732817b4c49067cd561dd13ff730 (diff)
downloadotp-998d043865059dcf7f5055a62586cc1420c221b9.tar.gz
otp-998d043865059dcf7f5055a62586cc1420c221b9.tar.bz2
otp-998d043865059dcf7f5055a62586cc1420c221b9.zip
crypto: Throw notsup for AES IGE if openssl older than 0.9.8c
Diffstat (limited to 'lib/crypto/src/crypto.erl')
-rw-r--r--lib/crypto/src/crypto.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 0e8b80c1f9..41fe968558 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -1275,7 +1275,13 @@ aes_ige_256_encrypt(Key, IVec, Data) ->
aes_ige_256_decrypt(Key, IVec, Data) ->
aes_ige_crypt(Key, IVec, Data, false).
-aes_ige_crypt(_Key, _IVec, _Data, _IsEncrypt) -> ?nif_stub.
+aes_ige_crypt(Key, IVec, Data, IsEncrypt) ->
+ case aes_ige_crypt_nif(Key,IVec,Data,IsEncrypt) of
+ notsup -> erlang:error(notsup);
+ Bin -> Bin
+ end.
+
+aes_ige_crypt_nif(_Key, _IVec, _Data, _IsEncrypt) -> ?nif_stub.
%%
%% aes_ige_ivec(Data) -> binary()