Make spiffy work with openssl even in statically-linked binary.
This commit is contained in:
parent
fac8d8f4f1
commit
002d677769
3 changed files with 14 additions and 26 deletions
|
@ -87,18 +87,16 @@
|
|||
(print "Port: " port)
|
||||
(print "SSL: " ssl?)
|
||||
(when ssl?
|
||||
(print " Certificate:" (-certificate-))
|
||||
(print " Key:" (-key-)))
|
||||
(print " Certificate: " (-certificate-))
|
||||
(print " Key: " (-key-)))
|
||||
|
||||
(define listener
|
||||
(if ssl?
|
||||
(ssl-listen port)
|
||||
(ssl-listen* port: port
|
||||
certificate: (-certificate-)
|
||||
private-key: (-key-))
|
||||
(tcp-listen port)))
|
||||
|
||||
(when ssl?
|
||||
(ssl-load-certificate-chain! listener (-certificate-))
|
||||
(ssl-load-private-key! listener (-key-)))
|
||||
|
||||
(when (and (-user-) (-group-))
|
||||
(switch-user/group (-user-) (-group-)))
|
||||
|
||||
|
@ -110,15 +108,6 @@
|
|||
(password . ,(-db-pass-)))))
|
||||
(print dbconn)
|
||||
|
||||
(define (handle-request-by-path path)
|
||||
(print (->string path-lst) (length path))
|
||||
(define body
|
||||
(cond ((equal? path-lst '(/ ""))
|
||||
(print "index")
|
||||
)
|
||||
(else
|
||||
"error"))))
|
||||
|
||||
(define (handle-api-calls)
|
||||
#f)
|
||||
|
||||
|
@ -144,7 +133,12 @@
|
|||
(when (not (handle-api-calls))
|
||||
(send-response #:body (frontend-lookup "index.html"))))))))))
|
||||
|
||||
(debug-log (current-error-port))
|
||||
(accept-loop listener
|
||||
(if ssl?
|
||||
ssl-accept
|
||||
tcp-accept))
|
||||
tcp-accept)
|
||||
(if ssl?
|
||||
(lambda (p)
|
||||
(tcp-addresses (ssl-port->tcp-port p)))
|
||||
tcp-addresses))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue