aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-02-01 10:07:22 +0100
committerHans Nilsson <[email protected]>2019-02-04 11:55:30 +0100
commit55d6161c8025a07e1775b1ac1f2fee56fe38770d (patch)
tree3bc19821a966cce910684fe79e0a543c7a66a5af /lib/crypto
parent784fb8d859fe3277435c8046b55a65a80313c6f5 (diff)
downloadotp-55d6161c8025a07e1775b1ac1f2fee56fe38770d.tar.gz
otp-55d6161c8025a07e1775b1ac1f2fee56fe38770d.tar.bz2
otp-55d6161c8025a07e1775b1ac1f2fee56fe38770d.zip
crypto: Fix compilation < 1.0.0
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/c_src/cipher.c2
-rw-r--r--lib/crypto/c_src/hash.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/crypto/c_src/cipher.c b/lib/crypto/c_src/cipher.c
index 5d306b80dd..449e636037 100644
--- a/lib/crypto/c_src/cipher.c
+++ b/lib/crypto/c_src/cipher.c
@@ -94,9 +94,11 @@ int init_cipher_ctx(ErlNifEnv *env) {
return 1;
+#ifdef HAVE_EVP_AES_CTR
err:
PRINTF_ERR0("CRYPTO: Could not open resource type 'EVP_CIPHER_CTX'");
return 0;
+#endif
}
void init_cipher_types(ErlNifEnv* env)
diff --git a/lib/crypto/c_src/hash.c b/lib/crypto/c_src/hash.c
index d67e68f857..457e9d071a 100644
--- a/lib/crypto/c_src/hash.c
+++ b/lib/crypto/c_src/hash.c
@@ -54,9 +54,11 @@ int init_hash_ctx(ErlNifEnv* env) {
return 1;
+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
err:
PRINTF_ERR0("CRYPTO: Could not open resource type 'EVP_MD_CTX'");
return 0;
+#endif
}
ERL_NIF_TERM hash_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])