43 Gsasl_session *gsasl_session = NULL;
44 struct Buffer *output_buf = NULL;
45 char *imap_step_output = NULL;
47 int gsasl_rc = GSASL_OK;
71 char *gsasl_step_output = NULL;
72 gsasl_rc = gsasl_step64(gsasl_session,
"", &gsasl_step_output);
73 if ((gsasl_rc != GSASL_NEEDS_MORE) && (gsasl_rc != GSASL_OK))
76 gsasl_strerror(gsasl_rc));
83 gsasl_free(gsasl_step_output);
102 char *gsasl_step_output = NULL;
103 gsasl_rc = gsasl_step64(gsasl_session, imap_step_output, &gsasl_step_output);
104 if ((gsasl_rc == GSASL_NEEDS_MORE) || (gsasl_rc == GSASL_OK))
107 gsasl_free(gsasl_step_output);
113 gsasl_strerror(gsasl_rc));
119 }
while ((gsasl_rc == GSASL_NEEDS_MORE) || (gsasl_rc == GSASL_OK));
134 if ((gsasl_rc != GSASL_OK) || (imap_step_rc !=
IMAP_RES_OK))
IMAP authenticator multiplexor.
ImapAuthRes
Results of IMAP Authentication.
@ IMAP_AUTH_FAILURE
Authentication failed.
@ IMAP_AUTH_SUCCESS
Authentication successful.
@ IMAP_AUTH_UNAVAIL
Authentication method not permitted.
enum ImapAuthRes imap_auth_gsasl(struct ImapAccountData *adata, const char *method)
GNU SASL authenticator - Implements ImapAuth::authenticate()
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t mutt_buffer_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t mutt_buffer_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
const char * mutt_gsasl_get_mech(const char *requested_mech, const char *server_mechlist)
Pick a connection mechanism.
int mutt_gsasl_client_new(struct Connection *conn, const char *mech, Gsasl_session **sctx)
Create a new GNU SASL client.
void mutt_gsasl_client_finish(Gsasl_session **sctx)
Free a GNU SASL client.
int imap_cmd_start(struct ImapAccountData *adata, const char *cmdstr)
Given an IMAP command, send it to the server.
int imap_cmd_step(struct ImapAccountData *adata)
Reads server responses from an IMAP command.
bool imap_code(const char *s)
Was the command successful.
#define IMAP_RES_RESPOND
+
#define IMAP_RES_OK
<tag> OK ...
#define IMAP_RES_NO
<tag> NO ...
#define IMAP_CAP_SASL_IR
SASL initial response draft.
#define IMAP_RES_CONTINUE
* ...
char * imap_next_word(char *s)
Find where the next IMAP word begins.
#define IMAP_RES_BAD
<tag> BAD ...
@ LL_DEBUG2
Log at debug level 2.
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
Pop-specific Account data.
#define mutt_socket_send(conn, buf)
String manipulation buffer.
IMAP-specific Account data -.
ImapCapFlags capabilities
Capability flags.
char * capstr
Capability string from the server.
struct Connection * conn
Connection to IMAP server.