Changeset 5497:2731e5174c5a

Show
Ignore:
Timestamp:
2008-08-26 23:09:13 (3 months ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

Properly set the SASL external auth name when using SSL client certs.
Also zero out the account structure before filling it with available
data. Client certificates + SASL EXTERNAL were only working by luck.

Files:
5 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5495 r5497  
    1 2008-08-25 00:16 -0700  Brendan Cully  <brendan@kublai.com>  (53d9210aa4ee) 
     12008-08-26 02:07 -0700  Brendan Cully  <brendan@kublai.com>  (22498996719f) 
     2 
     3        * imap/imap.c: Remove leftover IMAP IDLE handling from before 
     4        [53d9210aa4ee]. 
     5 
     62008-08-25 00:52 -0700  Brendan Cully  <brendan@kublai.com>  (36aa1130091a) 
     7 
     8        * UPDATING, globals.h, imap/command.c, imap/imap.c, 
     9        imap/imap_private.h, imap/util.c, init.c, init.h: Introduce 
     10        $imap_pipeline_depth. This lets users control the number of 
     11        commands that mutt will queue up before sending them to the 
     12        server. Setting this to 0 disables pipelining, which should close 
     13        #2892. 
    214 
    315        * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c: 
  • imap/util.c

    r5495 r5497  
    22 * Copyright (C) 1996-8 Michael R. Elkins <me@mutt.org> 
    33 * Copyright (C) 1996-9 Brandon Long <blong@fiction.net> 
    4  * Copyright (C) 1999-2005 Brendan Cully <brendan@kublai.com> 
     4 * Copyright (C) 1999-2008 Brendan Cully <brendan@kublai.com> 
    55 *  
    66 *     This program is free software; you can redistribute it and/or modify 
     
    190190 
    191191  /* Defaults */ 
    192   mx->account.flags = 0; 
     192  memset(&mx->account, 0, sizeof(mx->account)); 
    193193  mx->account.port = ImapPort; 
    194194  mx->account.type = M_ACCT_TYPE_IMAP; 
  • mutt_sasl.c

    r5476 r5497  
    11/* 
    2  * Copyright (C) 2000-7 Brendan Cully <brendan@kublai.com> 
     2 * Copyright (C) 2000-8 Brendan Cully <brendan@kublai.com> 
    33 *  
    44 *     This program is free software; you can redistribute it and/or modify 
     
    247247      return -1; 
    248248    } 
     249  } 
     250  if (conn->account.user[0]) 
     251  { 
    249252    dprint (2, (debugfile, "External authentication name: %s\n", conn->account.user)); 
    250253    if (sasl_setprop (*saslconn, SASL_AUTH_EXTERNAL, conn->account.user) != SASL_OK) 
  • mutt_ssl.c

    r5483 r5497  
    875875    SSL_CTX_use_certificate_file(ssldata->ctx, SslClientCert, SSL_FILETYPE_PEM); 
    876876    SSL_CTX_use_PrivateKey_file(ssldata->ctx, SslClientCert, SSL_FILETYPE_PEM); 
     877     
     878    /* if we are using a client cert, SASL may expect an external auth name */ 
     879    mutt_account_getuser (&conn->account); 
    877880  } 
    878881} 
  • mutt_ssl_gnutls.c

    r5432 r5497  
    216216    *cnend = '\0'; 
    217217 
    218   dprint (2, (debugfile, "client CN: %s\n", cn)); 
     218  /* if we are using a client cert, SASL may expect an external auth name */ 
     219  mutt_account_getuser (&conn->account); 
    219220 
    220221err_dn: