View | Details | Raw Unified | Return to bug 238133 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-3 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	libesmtp
4
PORTNAME=	libesmtp
5
PORTVERSION=	1.0.6
5
PORTVERSION=	1.0.6
6
PORTREVISION=	2
6
PORTREVISION=	3
7
PORTEPOCH=	1
7
PORTEPOCH=	1
8
CATEGORIES=	mail
8
CATEGORIES=	mail
9
MASTER_SITES=	http://www.stafford.uklinux.net/libesmtp/ \
9
MASTER_SITES=	http://www.stafford.uklinux.net/libesmtp/ \
Lines 16-23 Link Here
16
LICENSE=	LGPL21+
16
LICENSE=	LGPL21+
17
LICENSE_FILE=	${WRKSRC}/COPYING.LIB
17
LICENSE_FILE=	${WRKSRC}/COPYING.LIB
18
18
19
BROKEN_SSL=	openssl111
20
21
USES=		gmake libtool tar:bzip2
19
USES=		gmake libtool tar:bzip2
22
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
23
# require-all-recipients (implied by enable-all) is required for Balsa
21
# require-all-recipients (implied by enable-all) is required for Balsa
(-)files/patch-openssl111 (+87 lines)
Line 0 Link Here
1
--- configure
2
+++ configure
3
@@ -11896,9 +11896,9 @@ fi
4
 
5
 fi
6
 if test x$with_openssl != xno ; then
7
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
8
-$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9
-if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
10
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11
+$as_echo_n "checking for SSL_new in -lssl... " >&6; }
12
+if test "${ac_cv_lib_ssl_SSL_new+set}" = set; then :
13
   $as_echo_n "(cached) " >&6
14
 else
15
   ac_check_lib_save_LIBS=$LIBS
16
@@ -11913,27 +11913,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17
 #ifdef __cplusplus
18
 extern "C"
19
 #endif
20
-char SSL_library_init ();
21
+char SSL_new ();
22
 int
23
 main ()
24
 {
25
-return SSL_library_init ();
26
+return SSL_new ();
27
   ;
28
   return 0;
29
 }
30
 _ACEOF
31
 if ac_fn_c_try_link "$LINENO"; then :
32
-  ac_cv_lib_ssl_SSL_library_init=yes
33
+  ac_cv_lib_ssl_SSL_new=yes
34
 else
35
-  ac_cv_lib_ssl_SSL_library_init=no
36
+  ac_cv_lib_ssl_SSL_new=no
37
 fi
38
 rm -f core conftest.err conftest.$ac_objext \
39
     conftest$ac_exeext conftest.$ac_ext
40
 LIBS=$ac_check_lib_save_LIBS
41
 fi
42
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
43
-$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
44
-if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
45
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
46
+$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
47
+if test "x$ac_cv_lib_ssl_SSL_new" = x""yes; then :
48
 
49
 				with_openssl=yes
50
 				LIBS="-lssl -lcrypto $LIBS"
51
--- smtp-tls.c
52
+++ smtp-tls.c
53
@@ -64,10 +64,12 @@ openssl_mutexcb (int mode, int n,
54
 		 const char *file __attribute__ ((unused)),
55
 		 int line __attribute__ ((unused)))
56
 {
57
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
58
   if (mode & CRYPTO_LOCK)
59
     pthread_mutex_lock (&openssl_mutex[n]);
60
   else
61
     pthread_mutex_unlock (&openssl_mutex[n]);
62
+#endif
63
 }
64
 #endif
65
 
66
@@ -76,7 +78,7 @@ starttls_init (void)
67
 {
68
   if (tls_init)
69
     return 1;
70
-
71
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
72
 #ifdef USE_PTHREADS
73
   /* Set up mutexes for the OpenSSL library */
74
   if (openssl_mutex == NULL)
75
@@ -94,9 +96,12 @@ starttls_init (void)
76
       CRYPTO_set_locking_callback (openssl_mutexcb);
77
     }
78
 #endif
79
-  tls_init = 1;
80
   SSL_load_error_strings ();
81
   SSL_library_init ();
82
+#else
83
+  OPENSSL_init_ssl(0, NULL);
84
+#endif
85
+  tls_init = 1;
86
   return 1;
87
 }

Return to bug 238133