aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2016-09-11 04:23:46 +0800
committermarino <marino@FreeBSD.org>2016-09-11 04:23:46 +0800
commita31399a89fd309c853650e4acbed7544c0d04836 (patch)
treeecd3b1164e20bb2170c44c929666d8c88a6daa13 /mail
parentafda13022d9c04c46b3ae84c553f48678bf97475 (diff)
downloadfreebsd-ports-gnome-a31399a89fd309c853650e4acbed7544c0d04836.tar.gz
freebsd-ports-gnome-a31399a89fd309c853650e4acbed7544c0d04836.tar.zst
freebsd-ports-gnome-a31399a89fd309c853650e4acbed7544c0d04836.zip
mail/prayer: Configure for any SSL base and support LibreSSL
Approved by: SSL blanket
Diffstat (limited to 'mail')
-rw-r--r--mail/prayer/Makefile4
-rw-r--r--mail/prayer/files/patch-lib_ssl.c27
2 files changed, 30 insertions, 1 deletions
diff --git a/mail/prayer/Makefile b/mail/prayer/Makefile
index ff6efb24000b..97dffa4774be 100644
--- a/mail/prayer/Makefile
+++ b/mail/prayer/Makefile
@@ -71,7 +71,9 @@ MAKE_ARGS+= TIDY_ENABLE=false
.if ${PORT_OPTIONS:MSSL}
MAKE_ARGS+= CCLIENT_SSL_ENABLE=true \
- SSL_ENABLE=true
+ SSL_ENABLE=true \
+ INCLUDES=-I${OPENSSLINC} \
+ LDFLAGS="${LDFLAGS} -L${OPENSSLLIB}"
.else
MAKE_ARGS+= CCLIENT_SSL_ENABLE=false \
SSL_ENABLE=false
diff --git a/mail/prayer/files/patch-lib_ssl.c b/mail/prayer/files/patch-lib_ssl.c
new file mode 100644
index 000000000000..377ef9948b10
--- /dev/null
+++ b/mail/prayer/files/patch-lib_ssl.c
@@ -0,0 +1,27 @@
+--- lib/ssl.c.orig 2012-06-30 14:30:08 UTC
++++ lib/ssl.c
+@@ -78,6 +78,7 @@ static void os_initialize_prng(struct ss
+ int totbytes = 0;
+ int bytes;
+
++#ifndef OPENSSL_NO_EGD
+ if (ssl_config->egd_socket) {
+ if ((bytes = RAND_egd(ssl_config->egd_socket)) == -1) {
+ log_fatal("EGD Socket %s failed", ssl_config->egd_socket);
+@@ -88,6 +89,7 @@ static void os_initialize_prng(struct ss
+ goto SEEDED; /* ditto */
+ }
+ }
++#endif
+
+ /* Try the good-old default /dev/urandom, if available */
+ totbytes += add_rand_file("/dev/urandom");
+@@ -387,7 +389,7 @@ void ssl_context_init(struct ssl_config
+ SSL_load_error_strings();
+
+ /* Set up client context: only used by accountd */
+- client_ctx = SSL_CTX_new(SSLv3_client_method());
++ client_ctx = SSL_CTX_new(SSLv23_client_method());
+ SSL_CTX_set_session_cache_mode(client_ctx, SSL_SESS_CACHE_BOTH);
+ SSL_CTX_set_info_callback(client_ctx, info_callback);
+ #ifdef SSL_MODE_AUTO_RETRY