aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/crypto.c
diff options
context:
space:
mode:
authorDoug Hogan <[email protected]>2018-12-21 08:03:53 -0800
committerDoug Hogan <[email protected]>2018-12-21 08:40:53 -0800
commit2bd13b4d55664518e4b2741de813ac726fe87892 (patch)
treeeb4506976e4842d65707e9822516813ca007f282 /lib/crypto/c_src/crypto.c
parentc1eb6e52b503fdcb7f69052e69b392ea6df3bdab (diff)
downloadotp-2bd13b4d55664518e4b2741de813ac726fe87892.tar.gz
otp-2bd13b4d55664518e4b2741de813ac726fe87892.tar.bz2
otp-2bd13b4d55664518e4b2741de813ac726fe87892.zip
Make engine ctx init internal to engine.c per PR feedback
Diffstat (limited to 'lib/crypto/c_src/crypto.c')
-rw-r--r--lib/crypto/c_src/crypto.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 5b42b976bb..27a0ebfd6b 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -190,17 +190,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
if (!init_cipher_ctx(env)) {
return __LINE__;
}
-
-#ifdef HAS_ENGINE_SUPPORT
- engine_ctx_rtype = enif_open_resource_type(env, NULL, "ENGINE_CTX",
- (ErlNifResourceDtor*) engine_ctx_dtor,
- ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER,
- NULL);
- if (!engine_ctx_rtype) {
- PRINTF_ERR0("CRYPTO: Could not open resource type 'ENGINE_CTX'");
+ if (!init_engine_ctx(env)) {
return __LINE__;
}
-#endif
if (library_initialized) {
/* Repeated loading of this library (module upgrade).