do security-guard check in ssl-load...
This commit is contained in:
parent
d6cb2ecee6
commit
1c0e08f0a6
|
@ -18,6 +18,7 @@
|
|||
(require ffi/unsafe
|
||||
ffi/unsafe/define
|
||||
ffi/unsafe/atomic
|
||||
ffi/file
|
||||
racket/port
|
||||
racket/tcp
|
||||
racket/string
|
||||
|
@ -425,15 +426,17 @@
|
|||
(raise-argument-error 'ssl-load-certificate-chain!
|
||||
"path-string?"
|
||||
pathname))
|
||||
(let ([path (path->bytes
|
||||
(let ([path
|
||||
(path->complete-path (cleanse-path pathname)
|
||||
(current-directory)))])
|
||||
(current-directory))])
|
||||
(security-guard-check-file who path '(read))
|
||||
(let ([path (path->bytes path)])
|
||||
(atomically ;; for to connect ERR_get_error to `load-it'
|
||||
(let ([n (load-it ctx path)])
|
||||
(unless (= n 1)
|
||||
(error who "load failed from: ~e ~a"
|
||||
pathname
|
||||
(get-error-message (ERR_get_error)))))))))
|
||||
(get-error-message (ERR_get_error))))))))))
|
||||
|
||||
(define (ssl-load-certificate-chain! ssl-context-or-listener pathname)
|
||||
(ssl-load-... 'ssl-load-certificate-chain!
|
||||
|
|
Loading…
Reference in New Issue
Block a user