X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_sasl.c;h=b4d200c3712c861c28054013d8473bd72a9c853e;hp=5c661c7f3bf430cb8f77d7bb0b2c9f2c35b86047;hb=11dfc0aa39e31496da16c708f972a6718dd7ee5c;hpb=96d53ff49c308769efbf708e1e65819077cb7af6 diff --git a/mutt_sasl.c b/mutt_sasl.c index 5c661c7..b4d200c 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -243,8 +243,8 @@ int mutt_sasl_client_new (CONNECTION * conn, sasl_conn_t ** saslconn) /*** set sasl IP properties, necessary for use with krb4 ***/ /* Do we need to fail if this fails? I would assume having these unset - * would just disable KRB4. Who wrote this code? I'm not sure how this - * interacts with the NSS code either, since that mucks with the fd. */ + * would just disable KRB4. Who wrote this code? + */ #ifndef USE_SASL2 /* with SASLv2 this all happens in sasl_client_new */ { struct sockaddr_in local, remote; @@ -288,12 +288,8 @@ int mutt_sasl_client_new (CONNECTION * conn, sasl_conn_t ** saslconn) return -1; } - /* we currently don't have an SSF finder for NSS (I don't know the API). - * If someone does it'd probably be trivial to write mutt_nss_get_ssf(). - * I have a feeling more SSL code could be shared between those two files, - * but I haven't looked into it yet, since I still don't know the APIs. */ -#if (defined(USE_SSL) || defined(USE_GNUTLS) && !defined(USE_NSS)) - if (conn->account.flags & M_ACCT_SSL) { +#if defined(USE_SSL) || defined(USE_GNUTLS) + if (conn->ssf) { #ifdef USE_SASL2 /* I'm not sure this actually has an effect, at least with SASLv2 */ debug_print (2, ("External SSF: %d\n", conn->ssf)); if (sasl_setprop (*saslconn, SASL_SSF_EXTERNAL, &(conn->ssf)) != SASL_OK) @@ -369,7 +365,7 @@ int mutt_sasl_interact (sasl_interact_t * interaction) interaction->len = mutt_strlen (resp) + 1; interaction->result = safe_malloc (interaction->len); - memcpy (interaction->result, resp, interaction->len); + memcpy ((char*) interaction->result, resp, interaction->len); interaction++; } @@ -495,7 +491,7 @@ static int mutt_sasl_cb_pass (sasl_conn_t * conn, void *context, int id, *psecret = (sasl_secret_t *) safe_malloc (sizeof (sasl_secret_t) + len); (*psecret)->len = len; - strcpy ((*psecret)->data, account->pass); /* __STRCPY_CHECKED__ */ + strcpy ((char*) (*psecret)->data, account->pass); /* __STRCPY_CHECKED__ */ return SASL_OK; }