[cl-plus-ssl-cvs] CVS cl+ssl

dlichteblau dlichteblau at common-lisp.net
Sat Nov 18 09:52:23 UTC 2006


Update of /project/cl-plus-ssl/cvsroot/cl+ssl
In directory clnet:/tmp/cvs-serv14455

Modified Files:
	cl+ssl.asd ffi.lisp index.html reload.lisp streams.lisp 
Log Message:
Patch by Lu\355s Oliveira, slightly tweaked


--- /project/cl-plus-ssl/cvsroot/cl+ssl/cl+ssl.asd	2006/09/04 07:49:37	1.3
+++ /project/cl-plus-ssl/cvsroot/cl+ssl/cl+ssl.asd	2006/11/18 09:52:21	1.4
@@ -7,21 +7,16 @@
 ;;; See LICENSE for details.
 
 (defpackage :cl+ssl-system
-  (:use :cl :asdf)
-  (:export #:*libssl-pathname*))
+  (:use :cl :asdf))
 
 (in-package :cl+ssl-system)
 
-(defparameter *libssl-pathname*
-    #+(or :win32 :mswindows) "libssl32.dll"
-    #-(or :win32 :mswindows) "/usr/lib/libssl.so")
-
 (defsystem :cl+ssl
   :depends-on (:cffi :trivial-gray-streams :flexi-streams)
   :serial t
   :components
-   ((:file "reload")
-    (:file "package")
+   ((:file "package")
+    (:file "reload")
     (:file "conditions")
     (:file "ffi")
     (:file "streams")
--- /project/cl-plus-ssl/cvsroot/cl+ssl/ffi.lisp	2005/11/25 20:14:04	1.3
+++ /project/cl-plus-ssl/cvsroot/cl+ssl/ffi.lisp	2006/11/18 09:52:21	1.4
@@ -9,7 +9,6 @@
 
 (in-package :cl+ssl)
 
-
 ;;; Global state
 ;;;
 (defvar *ssl-global-context* nil)
@@ -243,6 +242,6 @@
     (setf *bio-lisp-method* (make-bio-lisp-method))))
 
 (defun reload ()
-  (cffi:load-foreign-library cl+ssl-system:*libssl-pathname*)
+  (cffi:load-foreign-library 'libssl)
   (setf *ssl-global-context* nil)
   (setf *ssl-global-method* nil))
--- /project/cl-plus-ssl/cvsroot/cl+ssl/index.html	2006/11/18 09:49:21	1.6
+++ /project/cl-plus-ssl/cvsroot/cl+ssl/index.html	2006/11/18 09:52:21	1.7
@@ -105,13 +105,6 @@
 
     <h3>API functions</h3>
     <p>
-      <div class="def">Variable CL+SSL-SYSTEM:*LIBSSL-PATHNAME*</div>
-      Full pathname of the SSL library.  Defaults
-      to <tt>/usr/lib/libssl.so</tt>. If the default is not correct for
-      your system, set this variable between loading the .asd file and
-      load-op'ing the system.
-    </p>
-    <p>
       <div class="def">Function CL+SSL:MAKE-SSL-CLIENT-STREAM (stream &key external-format)</div>
       Return an SSL stream for the client socket <tt>stream</tt>.
       All reads and writes to this SSL stream will be pushed through the
--- /project/cl-plus-ssl/cvsroot/cl+ssl/reload.lisp	2005/11/16 17:07:53	1.2
+++ /project/cl-plus-ssl/cvsroot/cl+ssl/reload.lisp	2006/11/18 09:52:21	1.3
@@ -13,5 +13,10 @@
 ;;;   - but not every time ffi.lisp is re-loaded as would happen if we
 ;;;     put this directly into ffi.lisp
 
-(in-package :cl+ssl-system)
-(cffi:load-foreign-library *libssl-pathname*)
+(in-package :cl+ssl)
+
+(cffi:define-foreign-library libssl
+  (:windows "libssl32.dll")
+  (t (:default "libssl")))
+
+(cffi:use-foreign-library libssl)
--- /project/cl-plus-ssl/cvsroot/cl+ssl/streams.lisp	2005/11/25 22:39:42	1.4
+++ /project/cl-plus-ssl/cvsroot/cl+ssl/streams.lisp	2006/11/18 09:52:21	1.5
@@ -118,8 +118,7 @@
 
 (defmethod stream-write-sequence ((stream ssl-stream) thing start end &key)
   (check-type thing (simple-array (unsigned-byte 8) (*)))
-  (let ((buf (ssl-stream-output-buffer stream))
-	(socket (ssl-stream-socket stream)))
+  (let ((buf (ssl-stream-output-buffer stream)))
     (when (> (+ (- end start) (ssl-stream-output-pointer stream)) (length buf))
       ;; not enough space left?  flush buffer.
       (force-output stream)




More information about the cl-plus-ssl-cvs mailing list