From 3e9f5e0b67a6b74bd5771e92079639a9ff02f194 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 18 Apr 2021 11:05:36 -0600 Subject: * Fixes to the support for ssl ciphers (variable could be set in alpine, but never seen by c-client.) --- alpine/alpine.c | 1 + imap/src/osdep/unix/ssl_unix.c | 3 ++- pith/conf.h | 1 + pith/pine.hlp | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/alpine/alpine.c b/alpine/alpine.c index 6e2c0ed..c2b7b37 100644 --- a/alpine/alpine.c +++ b/alpine/alpine.c @@ -474,6 +474,7 @@ main(int argc, char **argv) set_system_certs_container(pine_state); set_user_certs_path(pine_state); set_user_certs_container(pine_state); + mail_parameters(NULL, SET_SSLCIPHERS, (void *) pine_state->VAR_SSLCIPHERS); #endif #ifdef SMIME diff --git a/imap/src/osdep/unix/ssl_unix.c b/imap/src/osdep/unix/ssl_unix.c index 841077c..b43842d 100644 --- a/imap/src/osdep/unix/ssl_unix.c +++ b/imap/src/osdep/unix/ssl_unix.c @@ -1,5 +1,5 @@ /* ======================================================================== - * Copyright 2019 Eduardo Chappa + * Copyright 2019-2021 Eduardo Chappa * Copyright 2008-2009 Mark Crispin * ======================================================================== */ @@ -417,6 +417,7 @@ static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags) /* set cipher list */ ciphers = (char *) mail_parameters (NIL,GET_SSLCIPHERS,NIL); if(ciphers != NIL + && *ciphers != '\0' && !SSL_CTX_set_cipher_list (stream->context,ciphers)) return "No listed ciphers recognized"; /* if a non-standard path desired */ diff --git a/pith/conf.h b/pith/conf.h index e35c629..739b015 100644 --- a/pith/conf.h +++ b/pith/conf.h @@ -142,6 +142,7 @@ #define GLO_SSLUSERCAPATH vars[V_USERSSLCAPATH].global_val.l #define VAR_SSLUSERCAFILE vars[V_USERSSLCAFILE].current_val.l #define GLO_SSLUSERCAFILE vars[V_USERSSLCAFILE].global_val.l +#define VAR_SSLCIPHERS vars[V_SSLCIPHERS].current_val.p #endif #define VAR_INDEX_COLOR_STYLE vars[V_INDEX_COLOR_STYLE].current_val.p #define GLO_INDEX_COLOR_STYLE vars[V_INDEX_COLOR_STYLE].global_val.p diff --git a/pith/pine.hlp b/pith/pine.hlp index a226e99..22f4600 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -188,7 +188,7 @@ new additions to Alpine, please check it periodically.

New features include: