diff --git a/git-mirage.opam b/git-mirage.opam index d7a747dc0..9ad8e285b 100644 --- a/git-mirage.opam +++ b/git-mirage.opam @@ -27,7 +27,7 @@ depends: [ "ca-certs-nss" "mirage-crypto" "ptime" - "x509" + "x509" {>= "0.16.2"} "cstruct" "tcpip" {>= "7.0.0"} "domain-name" {>= "0.3.0"} diff --git a/src/git-mirage/git_mirage_http.ml b/src/git-mirage/git_mirage_http.ml index b4bbcbba0..d04681c46 100644 --- a/src/git-mirage/git_mirage_http.ml +++ b/src/git-mirage/git_mirage_http.ml @@ -272,22 +272,7 @@ struct | Some str -> ( match X509.Authenticator.of_string str with | Ok auth -> auth time - | Error (`Msg _) -> - Fmt.failwith - "Invalid TLS authenticator: %S\n\ - The format of it is:\n\ - - [none]: no authentication\n\ - - [key-fp(:?):]: to \ - authenticate a peer via its key fingerprintf (hash is \ - optional and defaults to SHA256)\n\ - - [cert-fp(:?):]: to \ - authenticate a peer via its certificate fingerprint (hash is \ - optional and defaults to SHA256)\n\ - - [trust-anchor(:)+] to \ - authenticate a peer from a list of certificates (certificate \ - must be in PEM format witthout header and footer (----BEGIN \ - CERTIFICATE----) and without newlines).\n" - str) + | Error (`Msg msg) -> failwith msg) in let tls = Tls.Config.client ~authenticator () in let ctx = Mimic.add git_mirage_http_tls_config tls ctx in