(nntp-open-connection-function): Mention
authorSimon Josefsson <jas@extundo.com>
Sun, 23 Mar 2003 14:02:47 +0000 (14:02 +0000)
committerSimon Josefsson <jas@extundo.com>
Sun, 23 Mar 2003 14:02:47 +0000 (14:02 +0000)
nntp-open-tls-stream.
(nntp-open-tls-stream): New function.

lisp/ChangeLog
lisp/nntp.el

index b250540..be75e1f 100644 (file)
@@ -1,5 +1,9 @@
 2003-03-23  Simon Josefsson  <jas@extundo.com>
 
+       * nntp.el (nntp-open-connection-function): Mention
+       nntp-open-tls-stream.
+       (nntp-open-tls-stream): New function.
+
        * tls.el: New file.
 
        * nnimap.el (nnimap-server-port, nnimap-stream): Say TLS/SSL
index 2927dc6..b2ff431 100644 (file)
@@ -75,6 +75,7 @@ host.
 Direct connections:
 - `nntp-open-network-stream' (the default),
 - `nntp-open-ssl-stream',
+- `nntp-open-tls-stream',
 - `nntp-open-telnet-stream'.
 
 Indirect connections:
@@ -1161,7 +1162,19 @@ password contained in '~/.nntp-authinfo'."
     (process-kill-without-query proc)
     (save-excursion
       (set-buffer buffer)
-      (nntp-wait-for-string "^\r*20[01]")
+      (let ((nntp-connection-alist (list proc buffer nil)))
+       (nntp-wait-for-string "^\r*20[01]"))
+      (beginning-of-line)
+      (delete-region (point-min) (point))
+      proc)))
+
+(defun nntp-open-tls-stream (buffer)
+  (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number)))
+    (process-kill-without-query proc)
+    (save-excursion
+      (set-buffer buffer)
+      (let ((nntp-connection-alist (list proc buffer nil)))
+       (nntp-wait-for-string "^\r*20[01]"))
       (beginning-of-line)
       (delete-region (point-min) (point))
       proc)))