Coverage report: /home/ellis/.stash/lisp/cl-plus-ssl/src/config.lisp
Kind | Covered | All | % |
expression | 0 | 9 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;;; -*- Mode: LISP; Syntax: COMMON-LISP; indent-tabs-mode: nil; coding: utf-8; show-trailing-whitespace: t -*-
3
;;; Copyright (C) contributors as per cl+ssl git history
5
;;; See LICENSE for details.
9
(defpackage :cl+ssl/config
10
(:documentation "By default cl+ssl searches for OpenSSL shared libraries
11
in platform-dependent default locations.
13
To explicitly specify what to load, use the cl+ssl/config
14
module before loading cl+ssl:
16
(ql:quickload \"cl+ssl/config\")
17
(cl+ssl/config:define-libssl-path \"/opt/local/lib/libssl.dylib\")
18
(cl+ssl/config:define-libcrypto-path \"/opt/local/lib/libcrypto.dylib\")
19
(ql:quickload \"cl+ssl\")
21
The PATH parameter of those two macros is not evaluated.
22
This is dictated by CFFI. So either use a literal
23
or compute it at the macro-expansion time.
25
You may need to rebuild cl+ssl for the changed paths to have effect.
26
This depends on CFFI and the FFI implementation of your Lisp.
28
(:export #:define-libssl-path
29
#:define-libcrypto-path)
32
(in-package :cl+ssl/config)
34
(defvar *libssl-override* nil)
35
(defvar *libcrypto-override* nil)
37
(defmacro define-libssl-path (path)
38
"Define the path where libssl resides to be PATH (not evaluated). This
39
macro should be used before loading CL+SSL.
42
(cffi:define-foreign-library libssl (t ,path))
43
(setq *libssl-override* t)))
45
(defmacro define-libcrypto-path (path)
46
"Define the path where libcrypto resides to be PATH (not evaluated). This
47
macro should be used before loading CL+SSL.
50
(cffi:define-foreign-library libcrypto (t ,path))
51
(setq *libcrypto-override* t)))
54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55
;; The above package replaces now _deprecated_ *FEATURES* flag
56
;; :CL+SSL-FOREIGN-LIBS-ALREADY-LOADED
58
;; The flag allows user to load himself the
59
;; libssl / libcrypto (and libeay32 on Windows),
60
;; thus choosing the foreigh library(-ies) path and version to load.
62
;; You will probably need to recompile CL+SSL for the feature to take
65
;; If specified, neither loading of the cl+ssl ASDF system nor
66
;; (cl+ssl:reload) try to load the foreign libraries, assuming
67
;; user has loaded them already.
69
;; The _deprecated_ usage example:
71
;; (cffi:load-foreign-library "libssl.so.1.0.0")
73
;; (let ((*features* (cons :cl+ssl-foreign-libs-already-loaded
76
;; (ql:quickload :a-system-which-depends-on-cl+ssl)
78
;; ;; or just load cl+ssl
79
;; (ql:quickload :cl+ssl))
81
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;