summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2012-02-23 23:11:13 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2012-02-23 23:11:13 +0000
commit50fc698ea889b2439723497ddde594b19db209d5 (patch)
tree8990dd580fa67d28c04120c55fa1e01349155fa5
parentb1890b0f104f5f17ecf314c9b7f74ee482e00fd9 (diff)
downloademacs-50fc698ea889b2439723497ddde594b19db209d5.tar.gz
nntp.el (nntp-send-authinfo): Work for secure nntp entry in authinfo.
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/nntp.el11
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 0729fb90c48..e58b6cc7773 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
+2012-02-23 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nntp.el (nntp-send-authinfo): Work for secure nntp entry in authinfo.
+
2012-02-20 Lars Ingebrigtsen <larsi@gnus.org>
* mm-decode.el (mm-shr): Remove "soft hyphens".
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 98393a61764..0f60fdd756b 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -1252,10 +1252,13 @@ If SEND-IF-FORCE, only send authinfo to the server if the
(let* ((list (netrc-parse nntp-authinfo-file))
(alist (netrc-machine list nntp-address "nntp"))
(auth-info
- (nth 0 (auth-source-search :max 1
- :host (list nntp-address
- (nnoo-current-server 'nntp))
- :port '("119" "nntp"))))
+ (nth 0 (auth-source-search
+ :max 1
+ :host (list nntp-address
+ (nnoo-current-server 'nntp))
+ :port (or (cdr (assoc (format "%s" nntp-port-number)
+ '(("563" . ("563" "nntps" "snews")))))
+ '("119" "nntp")))))
(auth-user (plist-get auth-info :user))
(auth-force (plist-get auth-info :force))
(auth-passwd (plist-get auth-info :secret))