ssmpt: Fix compilation without deprecated OpenSSL APIs 8811/head
authorRosen Penev <rosenp@gmail.com>
Sat, 27 Apr 2019 18:20:41 +0000 (11:20 -0700)
committerRosen Penev <rosenp@gmail.com>
Sat, 27 Apr 2019 18:20:41 +0000 (11:20 -0700)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
mail/ssmtp/Makefile
mail/ssmtp/patches/020-openssl-deprecated.patch [new file with mode: 0644]

index fb976d5e63439d5a658695b01f6fd3963b669675..f6322cf61927bfe0e668082eb2546e1b21f290ac 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ssmtp
 PKG_VERSION:=2.64
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 PKG_LICENSE:=GPL-2.0+
 
diff --git a/mail/ssmtp/patches/020-openssl-deprecated.patch b/mail/ssmtp/patches/020-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..c4cc6b2
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/ssmtp.c
++++ b/ssmtp.c
+@@ -1046,8 +1046,10 @@ int smtp_open(char *host, int port)
+       /* Init SSL stuff */
+       SSL_CTX *ctx = NULL;
+       X509 *server_cert;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+       SSL_load_error_strings();
+       SSLeay_add_ssl_algorithms();
++#endif
+       ctx = SSL_CTX_new(SSLv23_client_method());
+       if(!ctx) {
+               log_event(LOG_ERR, "No SSL support initiated\n");