# [PATCHv2] imap-send: Fix compilation without deprecated OpenSSL APIs

1 messages from 2018-12-27 to 2018-12-27. Participants: Rosen Penev.
Thread: https://gitlist.dev/t/50117

## Rosen Penev, 2018-12-27 18:00

Subject: [PATCHv2] imap-send: Fix compilation without deprecated OpenSSL APIs
Message-ID: <20181227180024.2684-1-rosenp@gmail.com>
URL: https://gitlist.dev/e/20181227180024.2684-1-rosenp%40gmail.com

```
Initialization in OpenSSL has been deprecated in version 1.1. This makes
compilation fail when deprecated APIs for OpenSSL are compile-time
disabled.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 imap-send.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/imap-send.c b/imap-send.c
index b4eb886e2..877a4e368 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -284,8 +284,10 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve
 	int ret;
 	X509 *cert;
 
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
 	SSL_library_init();
 	SSL_load_error_strings();
+#endif
 
 	meth = SSLv23_method();
 	if (!meth) {
-- 
2.20.1


```
