Listen and SSL setup.
This commit is contained in:
parent
be9a620fd2
commit
6748d4327c
1 changed files with 19 additions and 2 deletions
|
@ -2,6 +2,10 @@
|
|||
command-line
|
||||
texts)
|
||||
|
||||
(define -port- (make-parameter #f))
|
||||
(define -certificate- (make-parameter #f))
|
||||
(define -key- (make-parameter #f))
|
||||
|
||||
(command-line
|
||||
print-help
|
||||
(-h () "This help"
|
||||
|
@ -18,7 +22,20 @@
|
|||
(exit 0))
|
||||
""
|
||||
"Configuration options:"
|
||||
(-p (port) "Listen port"
|
||||
(-port- (string->number port)))
|
||||
(-c (cert) "Certificate"
|
||||
(-certificate- cert))
|
||||
(-k (key) "Private key"
|
||||
(-key- key))
|
||||
)
|
||||
|
||||
(display "brminv")
|
||||
(newline)
|
||||
(define ssl? (and (-certificate-) (-key-) #t))
|
||||
(define port (or (-port-) (if ssl? 443 80)))
|
||||
|
||||
(print banner-line)
|
||||
(print "Port: " port)
|
||||
(print "SSL: " ssl?)
|
||||
(when ssl?
|
||||
(print " Certificate:" (-certificate-))
|
||||
(print " Key:" (-key-)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue