From 998d043865059dcf7f5055a62586cc1420c221b9 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 27 Nov 2013 18:00:30 +0100 Subject: crypto: Throw notsup for AES IGE if openssl older than 0.9.8c --- lib/crypto/src/crypto.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/crypto/src/crypto.erl') 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() -- cgit v1.2.3