*** nntp.el-orig Sun Mar 12 18:55:03 2000 --- nntp.el Sun Mar 12 23:13:11 2000 *************** *** 222,228 **** (eval-and-compile (autoload 'mail-source-read-passwd "mail-source") ! (autoload 'open-ssl-stream "ssl")) --- 222,230 ---- (eval-and-compile (autoload 'mail-source-read-passwd "mail-source") ! (autoload 'open-ssl-stream "ssl") ! (autoload 'starttls-open-stream "starttls") ! (autoload 'starttls-negotiate "starttls")) *************** *** 902,907 **** --- 904,911 ---- (set-buffer nntp-server-buffer) (let ((nnheader-callback-function nil)) (run-hooks 'nntp-server-opened-hook) + (if (eq nntp-open-connection-function 'nntp-open-tls-stream) + (nntp-starttls process)) (nntp-send-authinfo t)))) (nntp-kill-buffer (process-buffer process)) nil)))) *************** *** 919,924 **** --- 923,937 ---- (beginning-of-line) (delete-region (point-min) (point)) proc))) + + (defun nntp-starttls (process) + (nntp-send-command "^3.*\r?\n" "STARTTLS") + (starttls-negotiate process)) + + (defun nntp-open-tls-stream (buffer) + (as-binary-process + (starttls-open-stream + "nntpd" buffer nntp-address nntp-port-number))) (defun nntp-read-server-type () "Find out what the name of the server we have connected to is."