summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-04-18 11:05:36 -0600
committerEduardo Chappa <chappa@washington.edu>2021-04-18 11:05:36 -0600
commit3e9f5e0b67a6b74bd5771e92079639a9ff02f194 (patch)
tree1de6349624f640c7b928311be660d014d202218c
parent43f4dca2ead9fb8f65778c2772228dff554e1c75 (diff)
downloadalpine-3e9f5e0b67a6b74bd5771e92079639a9ff02f194.tar.xz
* Fixes to the support for ssl ciphers (variable could be set
in alpine, but never seen by c-client.)
-rw-r--r--alpine/alpine.c1
-rw-r--r--imap/src/osdep/unix/ssl_unix.c3
-rw-r--r--pith/conf.h1
-rw-r--r--pith/pine.hlp2
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.
<P>
New features include:
<UL>
-<LI> New configuration variable <a href="h_config_ssl_ciphers"><!--#echo var="VAR_ssl-ciphers"--></a> that allows
+<LI> Unix Alpine: New configuration variable <a href="h_config_ssl_ciphers"><!--#echo var="VAR_ssl-ciphers"--></a> that allows
users to list the ciphers to use when connecting to a SSL server.
Based on a collaboration with Professor Martin Trusler.
<LI> New hidden feature <a href="h_config_delete_before_writing"><!--#echo var="FEAT_enable-delete-before-writing"--></a>