Skip to content

Commit

Permalink
Git_mirage_http: the authenticator format description has been incorp…
Browse files Browse the repository at this point in the history
…orated into x509 0.16.2, use this
  • Loading branch information
hannesm committed Oct 5, 2022
1 parent 6c5f401 commit bfb352b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion git-mirage.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
17 changes: 1 addition & 16 deletions src/git-mirage/git_mirage_http.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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(:<hash>?):<base64-encoded fingerprint>]: to \
authenticate a peer via its key fingerprintf (hash is \
optional and defaults to SHA256)\n\
- [cert-fp(:<hash>?):<base64-encoded fingerprint>]: to \
authenticate a peer via its certificate fingerprint (hash is \
optional and defaults to SHA256)\n\
- [trust-anchor(:<base64-encoded DER certificate>)+] 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
Expand Down

0 comments on commit bfb352b

Please sign in to comment.