aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-02-04 12:01:16 +0100
committerHans Nilsson <[email protected]>2019-02-04 12:01:16 +0100
commitc66d0d2396bb1759b49f4fc383a6df0f6b918699 (patch)
tree90258923508ddc15c384fbf1d26362c0ef68d8f5 /lib
parent4bdbb313f621d54038a9c17c6d9895650d539eab (diff)
parent0c441ec09fa648af869e6080f671dee802d62e3d (diff)
downloadotp-c66d0d2396bb1759b49f4fc383a6df0f6b918699.tar.gz
otp-c66d0d2396bb1759b49f4fc383a6df0f6b918699.tar.bz2
otp-c66d0d2396bb1759b49f4fc383a6df0f6b918699.zip
Merge branch 'hans/crypto/fixes/OTP-14732'
* hans/crypto/fixes/OTP-14732: otp_test_engine.c fixes crypto: Fix compilation < 1.0.0
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/c_src/cipher.c2
-rw-r--r--lib/crypto/c_src/hash.c2
-rw-r--r--lib/crypto/c_src/otp_test_engine.c4
3 files changed, 7 insertions, 1 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[])
diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c
index fdc60f3bbc..fd26b7cb5d 100644
--- a/lib/crypto/c_src/otp_test_engine.c
+++ b/lib/crypto/c_src/otp_test_engine.c
@@ -104,9 +104,11 @@ static int test_init(ENGINE *e) {
return 111;
- err:
+#if defined(FAKE_RSA_IMPL)
+err:
fprintf(stderr, "Setup RSA_METHOD failed\r\n");
return 0;
+#endif
}
static void add_test_data(unsigned char *md, unsigned int len)