val encode_der : t -> string
val issuer : t -> X509.Distinguished_name.t
val this_update : t -> Ptime.t
val next_update : t -> Ptime.t option
type revoked_cert = X509.CRL.revoked_cert = {
serial : string;
date : Ptime.t;
extensions : X509.Extension.t;
}
val extensions : t -> X509.Extension.t
val crl_number : t -> int option
val signature_algorithm :
t ->
(X509.Key_type.signature_scheme * Digestif.hash') option
val validate :
t ->
?allowed_hashes:Digestif.hash' list ->
X509.Public_key.t ->
(unit, [> X509.Validation.signature_error ]) Stdlib.result
type verification_error = [
| `Bad_encoding of X509.Distinguished_name.t * string * string
| `Bad_signature of X509.Distinguished_name.t * string
| `Hash_not_allowed of
X509.Distinguished_name.t
* [ `MD5 | `SHA1 | `SHA224 | `SHA256 | `SHA384 | `SHA512 ]
| `Issuer_subject_mismatch of
X509.Distinguished_name.t * X509.Distinguished_name.t
| `Msg of string
| `Next_update_scheduled of X509.Distinguished_name.t * Ptime.t * Ptime.t
| `Not_yet_valid of X509.Distinguished_name.t * Ptime.t * Ptime.t
| `Unsupported_algorithm of X509.Distinguished_name.t * string
| `Unsupported_keytype of X509.Distinguished_name.t * X509.Public_key.t
]
val verify :
t ->
?allowed_hashes:Digestif.hash' list ->
?time:Ptime.t ->
X509.Certificate.t ->
(unit, [> verification_error ]) Stdlib.result
val is_revoked :
?allowed_hashes:Digestif.hash' list ->
issuer:X509.Certificate.t ->
cert:X509.Certificate.t ->
t list ->
bool
val decode_der : contents:string -> t Core.Or_error.t
val of_pem_dir : directory:Core.Filename.t -> t list Async.Deferred.Or_error.t