isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 2f7e60a3ed352fc21ab828c01280f38706bcdd68
parent 16aa17053dff538463bc39d8b427b1c5713a9ec4
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat,  9 May 2015 17:12:31 +0200

fix #ifdefs around AuthMech & RequireCRAM

these options don't depend on HAVE_LIBSSL.

Diffstat:
Msrc/drv_imap.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c @@ -2686,8 +2686,9 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) /* Legacy SSL options */ int require_ssl = -1, use_imaps = -1; int use_sslv2 = -1, use_sslv3 = -1, use_tlsv1 = -1, use_tlsv11 = -1, use_tlsv12 = -1; - int require_cram = -1; #endif + /* Legacy SASL option */ + int require_cram = -1; if (!strcasecmp( "IMAPAccount", cfg->cmd )) { server = nfcalloc( sizeof(*server) ); @@ -2803,6 +2804,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) use_tlsv11 = parse_bool( cfg ); else if (!strcasecmp( "UseTLSv1.2", cfg->cmd )) use_tlsv12 = parse_bool( cfg ); +#endif else if (!strcasecmp( "AuthMech", cfg->cmd ) || !strcasecmp( "AuthMechs", cfg->cmd )) { arg = cfg->val; @@ -2811,7 +2813,6 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) while ((arg = get_arg( cfg, ARG_OPTIONAL, 0 ))); } else if (!strcasecmp( "RequireCRAM", cfg->cmd )) require_cram = parse_bool( cfg ); -#endif else if (!strcasecmp( "Tunnel", cfg->cmd )) server->sconf.tunnel = nfstrdup( cfg->val ); else if (store) { @@ -2891,7 +2892,6 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) server->ssl_type = server->sconf.tunnel ? SSL_None : SSL_STARTTLS; } #endif -#ifdef HAVE_LIBSSL if (require_cram >= 0) { if (server->auth_mechs) { error( "%s '%s': The deprecated RequireCRAM option is mutually exlusive with AuthMech.\n", type, name ); @@ -2902,7 +2902,6 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) if (require_cram) add_string_list(&server->auth_mechs, "CRAM-MD5"); } -#endif if (!server->auth_mechs) add_string_list( &server->auth_mechs, "*" ); if (!server->sconf.port)