#include "lib/intl.h"
#include "lib/debug.h"
-#ifdef USE_SASL2
+#ifdef USE_SASL
#include <sasl/sasl.h>
#include <sasl/saslutil.h>
-#else
-#include <sasl.h>
-#include <saslutil.h>
#endif
/* imap_auth_sasl: Default authenticator if available. */
char buf[HUGE_STRING];
const char *mech;
-#ifdef USE_SASL2
+#ifdef USE_SASL
const char *pc = NULL;
-#else
- char *pc = NULL;
#endif
unsigned int len, olen;
unsigned char client_start;
if (mutt_bit_isset (idata->capabilities, AUTH_ANON) &&
(!idata->conn->account.user[0] ||
!ascii_strncmp (idata->conn->account.user, "anonymous", 9)))
-#ifdef USE_SASL2
+#ifdef USE_SASL
rc = sasl_client_start (saslconn, "AUTH=ANONYMOUS", NULL, &pc, &olen,
&mech);
-#else
- rc =
- sasl_client_start (saslconn, "AUTH=ANONYMOUS", NULL, NULL, &pc, &olen,
- &mech);
#endif
}
if (rc != SASL_OK && rc != SASL_CONTINUE)
do {
-#ifdef USE_SASL2
+#ifdef USE_SASL
rc = sasl_client_start (saslconn, method, &interaction,
&pc, &olen, &mech);
-#else
- rc = sasl_client_start (saslconn, method, NULL, &interaction,
- &pc, &olen, &mech);
#endif
if (rc == SASL_INTERACT)
mutt_sasl_interact (interaction);
goto bail;
if (irc == IMAP_CMD_RESPOND) {
-#ifdef USE_SASL2
+#ifdef USE_SASL
if (sasl_decode64
(idata->cmd.buf + 2, str_len (idata->cmd.buf + 2), buf,
LONG_STRING - 1,
-#else
- if (sasl_decode64 (idata->cmd.buf + 2, str_len (idata->cmd.buf + 2), buf,
#endif
&len) != SASL_OK) {
debug_print (1, ("error base64-decoding server response.\n"));
/* sasl_client_st(art|ep) allocate pc with malloc, expect me to
* free it */
-#ifndef USE_SASL2
+#ifndef USE_SASL
mem_free (&pc);
#endif
}