Removed a display statement.
And used libcrypto, which is provided by racket instead of trying to add the crypto lib by hand.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,3 +16,4 @@ compiled/
|
|||||||
*.dep
|
*.dep
|
||||||
|
|
||||||
/*.bak
|
/*.bak
|
||||||
|
/private/*.bak
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
racket/match
|
racket/match
|
||||||
openssl
|
openssl
|
||||||
openssl/libssl
|
openssl/libssl
|
||||||
|
openssl/libcrypto
|
||||||
(prefix-in c: racket/contract)
|
(prefix-in c: racket/contract)
|
||||||
racket/string
|
racket/string
|
||||||
)
|
)
|
||||||
@@ -112,10 +113,7 @@
|
|||||||
|
|
||||||
(define os (system-type 'os*))
|
(define os (system-type 'os*))
|
||||||
|
|
||||||
(define libopenssl (cond
|
(define libopenssl libcrypto)
|
||||||
([eq? os 'windows] (ffi-lib "libeay32.dll"))
|
|
||||||
(else (error (format "Cannot load openssl library on platform ~a" os)))
|
|
||||||
))
|
|
||||||
|
|
||||||
(define-ffi-definer define-ssl libopenssl)
|
(define-ffi-definer define-ssl libopenssl)
|
||||||
|
|
||||||
@@ -270,7 +268,6 @@
|
|||||||
alt-name (string-length alt-name))
|
alt-name (string-length alt-name))
|
||||||
|
|
||||||
(let ((r (X509_EXTENSION_create_by_NID #f NID_subject_alt_name 0 subj-alt-name-asn1)))
|
(let ((r (X509_EXTENSION_create_by_NID #f NID_subject_alt_name 0 subj-alt-name-asn1)))
|
||||||
(displayln r)
|
|
||||||
(when (eq? r #f)
|
(when (eq? r #f)
|
||||||
(error "Cannot allocate X509 Extenstion for Subject Alt Name"))
|
(error "Cannot allocate X509 Extenstion for Subject Alt Name"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user