me
/
guix
Archived
1
0
Fork 0

substitute: open-connection-for-uri/maybe add #:verify-certificate?.

As this is used by http-fetch and http-multiple-get when they call the
specified open connection procedure.

* guix/scripts/substitute.scm (open-connection-for-uri/maybe): Support
 #:verify-certificate?.
master
Christopher Baines 2021-01-07 19:42:14 +00:00
parent 205833b72c
commit f50b501a74
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577
1 changed files with 4 additions and 2 deletions

View File

@ -322,7 +322,8 @@ if file doesn't exist, and the narinfo otherwise."
(define* (open-connection-for-uri/maybe uri (define* (open-connection-for-uri/maybe uri
#:key #:key
fresh? fresh?
(time %fetch-timeout)) (time %fetch-timeout)
verify-certificate?)
"Open a connection to URI via 'open-connection-for-uri/cached' and return a "Open a connection to URI via 'open-connection-for-uri/cached' and return a
port to it, or, if connection failed, print a warning and return #f. Pass port to it, or, if connection failed, print a warning and return #f. Pass
#:fresh? to 'open-connection-for-uri/cached'." #:fresh? to 'open-connection-for-uri/cached'."
@ -332,7 +333,8 @@ port to it, or, if connection failed, print a warning and return #f. Pass
(catch #t (catch #t
(lambda () (lambda ()
(open-connection-for-uri/cached uri #:timeout time (open-connection-for-uri/cached uri #:timeout time
#:fresh? fresh?)) #:fresh? fresh?
#:verify-certificate? verify-certificate?))
(match-lambda* (match-lambda*
(('getaddrinfo-error error) (('getaddrinfo-error error)
(unless (hash-ref %unreachable-hosts host) (unless (hash-ref %unreachable-hosts host)