Skip to content

Commit

Permalink
adapt to x509 0.8.1 API
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Oct 15, 2019
1 parent e6c2751 commit d144aca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion openvpn.opam
Expand Up @@ -40,7 +40,7 @@ depends: [
"rresult"
"tls"
"dns-client" {>= "4.0.0"}
"x509" {>= "0.7.0"}
"x509" {>= "0.8.0"}
"duration"

# mirage:
Expand All @@ -49,4 +49,7 @@ depends: [
"tcpip" {>= "3.7.8"}
"mirage-random"
"mirage-clock"

"crowbar" {with-test}
"alcotest" {with-test}
]
6 changes: 3 additions & 3 deletions src/config.ml
Expand Up @@ -157,10 +157,10 @@ module Conf_map = struct
# Key fingerprint (sha256): %a\n%s</%s>"
entry_typ
entry_typ
(match X509.Distinguished_name.(find CN (X509.Certificate.subject cert)) with
(match X509.(Distinguished_name.common_name (Certificate.subject cert)) with
| None -> "NO common name" | Some x -> x)
(Fmt.(pair ~sep:(unit" -> ") Ptime.(pp_human()) Ptime.(pp_human()))
) (X509.Certificate.validity cert)
(Fmt.(pair ~sep:(unit" -> ") Ptime.(pp_human()) Ptime.(pp_human())))
(X509.Certificate.validity cert)
Fmt.(list ~sep:(unit " ") Domain_name.pp)
(Domain_name.Set.elements (X509.Certificate.hostnames cert))
Hex.pp (Hex.of_cstruct (X509.Certificate.fingerprint `SHA256 cert))
Expand Down

0 comments on commit d144aca

Please sign in to comment.