summaryrefslogtreecommitdiff
path: root/src/lib/emile
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2017-02-07 13:41:34 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-02-07 14:17:47 -0800
commit6f9df2bb3d5579bd6de8b8493c3a6770de46464e (patch)
treee9bccf91b18906080b26e18a00d5db79c2ebe913 /src/lib/emile
parent15d46a419f337f94912a2115de59b1f984458040 (diff)
emile: don't use APIs deprecated in openssl-1.1
Summary: When openssl-1.1.0 is built with `--api=1.1 disable-deprecated`, use of deprecated APIs leads to build failures. X-Gentoo-Bug: 606628 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=606628 Subscribers: cedric, jpeg Tags: #efl Differential Revision: https://phab.enlightenment.org/D4616 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/emile')
-rw-r--r--src/lib/emile/emile_cipher_openssl.c4
-rw-r--r--src/lib/emile/emile_main.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/emile/emile_cipher_openssl.c b/src/lib/emile/emile_cipher_openssl.c
index 9e0cc04422..0d63b6fa74 100644
--- a/src/lib/emile/emile_cipher_openssl.c
+++ b/src/lib/emile/emile_cipher_openssl.c
@@ -49,10 +49,12 @@ struct _Emile_SSL
49Eina_Bool 49Eina_Bool
50_emile_cipher_init(void) 50_emile_cipher_init(void)
51{ 51{
52#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
52 ERR_load_crypto_strings(); 53 ERR_load_crypto_strings();
53 SSL_library_init(); 54 SSL_library_init();
54 SSL_load_error_strings(); 55 SSL_load_error_strings();
55 OpenSSL_add_all_algorithms(); 56 OpenSSL_add_all_algorithms();
57#endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
56 58
57 return EINA_TRUE; 59 return EINA_TRUE;
58} 60}
@@ -192,8 +194,10 @@ on_error:
192 memset(ik, 0, sizeof (ik)); 194 memset(ik, 0, sizeof (ik));
193 195
194 /* Openssl error */ 196 /* Openssl error */
197#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
195 if (ctx) 198 if (ctx)
196 EVP_CIPHER_CTX_cleanup(ctx); 199 EVP_CIPHER_CTX_cleanup(ctx);
200#endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
197 201
198 free(buffer); 202 free(buffer);
199 203
diff --git a/src/lib/emile/emile_main.c b/src/lib/emile/emile_main.c
index c466776cc3..de96269872 100644
--- a/src/lib/emile/emile_main.c
+++ b/src/lib/emile/emile_main.c
@@ -103,10 +103,10 @@ emile_shutdown(void)
103 */ 103 */
104 gnutls_global_deinit(); 104 gnutls_global_deinit();
105#endif /* ifdef HAVE_GNUTLS */ 105#endif /* ifdef HAVE_GNUTLS */
106#ifdef HAVE_OPENSSL 106#if defined(HAVE_OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER))
107 EVP_cleanup(); 107 EVP_cleanup();
108 ERR_free_strings(); 108 ERR_free_strings();
109#endif /* ifdef HAVE_OPENSSL */ 109#endif /* if defined(HAVE_OPENSSL) && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) */
110 } 110 }
111 111
112 eina_log_domain_unregister(_emile_log_dom_global); 112 eina_log_domain_unregister(_emile_log_dom_global);