1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00

mail/prayer: Configure for any SSL base and support LibreSSL

Approved by:	SSL blanket
This commit is contained in:
John Marino 2016-09-10 20:23:46 +00:00
parent 8a141335ed
commit bde9bdbd22
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=421741
2 changed files with 30 additions and 1 deletions

View File

@ -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

View File

@ -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