Changeset 5497:2731e5174c5a
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5495
|
r5497
|
|
| 1 | | 2008-08-25 00:16 -0700 Brendan Cully <brendan@kublai.com> (53d9210aa4ee) |
| | 1 | 2008-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 | |
| | 6 | 2008-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. |
| 2 | 14 | |
| 3 | 15 | * imap/command.c, imap/imap.c, imap/imap_private.h, imap/message.c: |
-
|
r5495
|
r5497
|
|
| 2 | 2 | * Copyright (C) 1996-8 Michael R. Elkins <me@mutt.org> |
| 3 | 3 | * 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> |
| 5 | 5 | * |
| 6 | 6 | * This program is free software; you can redistribute it and/or modify |
| … |
… |
|
| 190 | 190 | |
| 191 | 191 | /* Defaults */ |
| 192 | | mx->account.flags = 0; |
| | 192 | memset(&mx->account, 0, sizeof(mx->account)); |
| 193 | 193 | mx->account.port = ImapPort; |
| 194 | 194 | mx->account.type = M_ACCT_TYPE_IMAP; |
-
|
r5476
|
r5497
|
|
| 1 | 1 | /* |
| 2 | | * Copyright (C) 2000-7 Brendan Cully <brendan@kublai.com> |
| | 2 | * Copyright (C) 2000-8 Brendan Cully <brendan@kublai.com> |
| 3 | 3 | * |
| 4 | 4 | * This program is free software; you can redistribute it and/or modify |
| … |
… |
|
| 247 | 247 | return -1; |
| 248 | 248 | } |
| | 249 | } |
| | 250 | if (conn->account.user[0]) |
| | 251 | { |
| 249 | 252 | dprint (2, (debugfile, "External authentication name: %s\n", conn->account.user)); |
| 250 | 253 | if (sasl_setprop (*saslconn, SASL_AUTH_EXTERNAL, conn->account.user) != SASL_OK) |
-
|
r5483
|
r5497
|
|
| 875 | 875 | SSL_CTX_use_certificate_file(ssldata->ctx, SslClientCert, SSL_FILETYPE_PEM); |
| 876 | 876 | 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); |
| 877 | 880 | } |
| 878 | 881 | } |
-
|
r5432
|
r5497
|
|
| 216 | 216 | *cnend = '\0'; |
| 217 | 217 | |
| 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); |
| 219 | 220 | |
| 220 | 221 | err_dn: |