[prev in list] [next in list] [prev in thread] [next in thread]
List: mutt-dev
Subject: patch-1.1.12.tlr.imap_force_ssl.1
From: Thomas Roessler <roessler () guug ! de>
Date: 2000-04-26 7:35:29
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
The attached patch adds a new configuration option named
imap_force_ssl. When set, mutt will always use SSL to
connect to IMAP servers.
--=20
http://www.guug.de/~roessler/
["patch-1.1.12.tlr.imap_force_ssl.1" (text/plain)]
Index: init.h
===================================================================
RCS file: /home/roessler/cvsroot/mutt/init.h,v
retrieving revision 2.79
diff -u -r2.79 init.h
--- init.h 2000/04/22 09:27:07 2.79
+++ init.h 2000/04/26 07:26:47
@@ -640,6 +640,14 @@
** This variable configures how often (in seconds) IMAP should look for
** new mail.
*/
+# ifdef USE_SSL
+ { "imap_force_ssl", DT_BOOL, R_NONE, OPTIMAPFORCESSL, 0 },
+ /*
+ ** .pp
+ ** If this variable is set, Mutt will always use SSL when
+ ** connecting to IMAP servers.
+ */
+# endif
{ "imap_list_subscribed", DT_BOOL, R_NONE, OPTIMAPLSUB, 0 },
/*
** .pp
Index: mutt.h
===================================================================
RCS file: /home/roessler/cvsroot/mutt/mutt.h,v
retrieving revision 2.61
diff -u -r2.61 mutt.h
--- mutt.h 2000/03/22 08:24:45 2.61
+++ mutt.h 2000/04/26 07:26:10
@@ -301,6 +301,9 @@
OPTIMAPLSUB,
OPTIMAPPASSIVE,
OPTIMAPSERVERNOISE,
+# ifdef USE_SSL
+ OPTIMAPFORCESSL,
+# endif
#endif
#ifdef USE_SSL
OPTSSLV2,
Index: imap/imap_ssl.c
===================================================================
RCS file: /home/roessler/cvsroot/mutt/imap/imap_ssl.c,v
retrieving revision 1.11
diff -u -r1.11 imap_ssl.c
--- imap/imap_ssl.c 2000/04/09 13:21:00 1.11
+++ imap/imap_ssl.c 2000/04/26 07:31:07
@@ -30,6 +30,7 @@
#include "mutt.h"
#include "imap.h"
+#include "imap_private.h"
#include "imap_socket.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
@@ -117,6 +118,14 @@
mutt_error (_("Failed to find enough entropy on your system"));
sleep (2);
return -1;
+}
+
+void imap_set_ssl (IMAP_MBOX *mx)
+{
+ if (! (mx->flags & M_IMAP_PORT))
+ mx->port = IMAP_SSL_PORT;
+ mx->socktype = M_NEW_SSL_SOCKET;
+ mx->flags |= M_IMAP_TYPE;
}
static int ssl_socket_open_err (CONNECTION *conn)
Index: imap/imap_ssl.h
===================================================================
RCS file: /home/roessler/cvsroot/mutt/imap/imap_ssl.h,v
retrieving revision 1.3
diff -u -r1.3 imap_ssl.h
--- imap/imap_ssl.h 2000/03/15 23:25:47 1.3
+++ imap/imap_ssl.h 2000/04/26 07:30:46
@@ -23,5 +23,6 @@
extern char *SslEntropyFile;
extern int ssl_socket_setup (CONNECTION *conn);
+extern void imap_set_ssl (IMAP_MBOX *mx);
#endif
Index: imap/util.c
===================================================================
RCS file: /home/roessler/cvsroot/mutt/imap/util.c,v
retrieving revision 1.21
diff -u -r1.21 util.c
--- imap/util.c 2000/04/24 13:10:11 1.21
+++ imap/util.c 2000/04/26 07:24:59
@@ -171,12 +171,7 @@
{
#ifdef USE_SSL
if (!strcmp (mx->type, "ssl"))
- {
- if (! (mx->flags & M_IMAP_PORT))
- mx->port = IMAP_SSL_PORT;
- mx->socktype = M_NEW_SSL_SOCKET;
- mx->flags |= M_IMAP_TYPE;
- }
+ imap_set_ssl (mx);
else
#endif
{
@@ -184,8 +179,12 @@
return (-1);
}
}
+#ifdef USE_SSL
+ else if (option (OPTIMAPFORCESSL))
+ imap_set_ssl (mx);
+#endif
}
-
+
return 0;
}
[Attachment #6 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic