Basic SNI support.

master
Tomek Dubrownik 2012-07-23 07:58:31 +02:00
parent f6a380940b
commit ad70733015
2 changed files with 4 additions and 2 deletions

View File

@ -563,6 +563,7 @@ PARAMETERS will not be used."
:key key :key key
:certificate-password certificate-password :certificate-password certificate-password
:verify verify :verify verify
:hostname (uri-host uri)
:max-depth max-depth :max-depth max-depth
:ca-file ca-file :ca-file ca-file
:ca-directory ca-directory))) :ca-directory ca-directory)))

View File

@ -305,7 +305,7 @@ which are not meant as separators."
(go next-cookie)))))) (go next-cookie))))))
#-:lispworks #-:lispworks
(defun make-ssl-stream (http-stream &key certificate key certificate-password verify (max-depth 10) ca-file ca-directory) (defun make-ssl-stream (http-stream &key certificate key certificate-password verify (max-depth 10) ca-file ca-directory hostname)
"Attaches SSL to the stream HTTP-STREAM and returns the SSL stream "Attaches SSL to the stream HTTP-STREAM and returns the SSL stream
\(which will not be equal to HTTP-STREAM)." \(which will not be equal to HTTP-STREAM)."
(declare (ignorable max-depth)) (declare (ignorable max-depth))
@ -337,6 +337,7 @@ which are not meant as separators."
:close-callback (lambda () (close s)) :close-callback (lambda () (close s))
:certificate certificate :certificate certificate
:key key :key key
:hostname hostname
:password certificate-password)) :password certificate-password))
#+:drakma-no-ssl #+:drakma-no-ssl
(error "SSL not supported. Remove :drakma-no-ssl from *features* to enable SSL")) (error "SSL not supported. Remove :drakma-no-ssl from *features* to enable SSL"))
@ -347,4 +348,4 @@ corresponding alist of name/value pairs."
(when query-string (when query-string
(loop for parameter-pair in (cl-ppcre:split "&" query-string) (loop for parameter-pair in (cl-ppcre:split "&" query-string)
for (name value) = (cl-ppcre:split "=" parameter-pair :limit 2) for (name value) = (cl-ppcre:split "=" parameter-pair :limit 2)
collect (cons name value)))) collect (cons name value))))