Commit 480f3db6 authored by Jan Idzikowski's avatar Jan Idzikowski
Browse files

Fixed TLS directly functionality, switch to ssl stream bevor read from stream.

parent ac47004b
Version 20080412.1
2008.04.12
Fixed TLS directly functionality, switch to ssl stream bevor read from stream.
Change cl-smtp.lisp, cl-smtp.asd, CHANGELOG
Version 20080402.1
2007.04.02
2008.04.02
Added support for sending raw messages. (Hans Huebner)
Fixed STARTTLS so that an EHLO command is sent after STARTTLS. (Hans Huebner)
Changed Authentication functionality, the actual authentication method used is determined by looking at the advertised features of the SMTP server. (Hans Huebner)
......
......@@ -2,7 +2,7 @@
;;; This file is part of CL-SMTP, the Lisp SMTP Client
;;; Copyright (C) 2004/2005/2006/2007 Jan Idzikowski
;;; Copyright (C) 2004/2005/2006/2007/2008 Jan Idzikowski
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the Lisp Lesser General Public License
......@@ -17,7 +17,7 @@
;;; Description: cl-smtp ASDF system definition file
(asdf:defsystem :cl-smtp
:version "20080402.1"
:version "20080412.1"
:perform (load-op :after (op webpage)
(pushnew :cl-smtp cl:*features*))
:depends-on (:usocket
......
......@@ -266,12 +266,10 @@
to use further down in the conversation, which may be different from
the original stream if we switched to SSL."
;; Read the initial greeting from the SMTP server
(smtp-command stream nil
220)
(unless (or ssl authentication)
;; Unless we want ESMTP features, perform classic SMTP handshake and return
;; Read the initial greeting from the SMTP server
(smtp-command stream nil 220)
(smtp-command stream (format nil "HELO ~A"
(usocket::get-host-name))
250)
......@@ -280,7 +278,10 @@
;; When SSL or authentication requested, perform ESMTP EHLO
(let (features)
(labels
((do-ehlo ()
((read-greetings ()
;; Read the initial greeting from the SMTP server
(smtp-command stream nil 220))
(do-ehlo ()
(setf features (rest (smtp-command stream (format nil "EHLO ~A" local-hostname)
250))))
(convert-connection-to-ssl ()
......@@ -299,6 +300,7 @@
:latin-1 :eol-style :lf)))))
(ecase ssl
((or t :starttls)
(read-greetings)
(do-ehlo)
(unless (find "STARTTLS" features :test #'equal)
(error "this server does not supports TLS"))
......@@ -313,8 +315,10 @@
(:tls
;; Plain SSL connection
(convert-connection-to-ssl)
(read-greetings)
(do-ehlo))
((nil)
(read-greetings)
(do-ehlo))))
(when authentication
(smtp-authenticate stream authentication features)))
......
......@@ -53,7 +53,8 @@ browse our CVS repository</a> or download the current development tree via
</tr>
<tr>
<td>CMU CL</td>
<td class="working">working</td>
<td class="broken">working</td>
<td>ssl not working </td>
</tr>
<tr>
<td>Lispworks</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment