This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
15
unikernel/duniverse/ca-certs-nss/lib/ca_certs_nss.ml
Normal file
15
unikernel/duniverse/ca-certs-nss/lib/ca_certs_nss.ml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
let trust_anchors =
|
||||
List.fold_left
|
||||
(fun acc data ->
|
||||
Result.bind acc (fun acc ->
|
||||
Result.map
|
||||
(fun cert -> cert :: acc)
|
||||
(X509.Certificate.decode_der data)))
|
||||
(Ok []) Trust_anchor.certificates
|
||||
|
||||
let authenticator =
|
||||
let time () = Some (Mirage_ptime.now ()) in
|
||||
fun ?crls ?allowed_hashes () ->
|
||||
Result.map
|
||||
(X509.Authenticator.chain_of_trust ~time ?crls ?allowed_hashes)
|
||||
trust_anchors
|
||||
Loading…
Add table
Add a link
Reference in a new issue