package tls-async

  1. Overview
  2. Docs
type status = [
  1. | `InternalError
  2. | `MalformedRequest
  3. | `SigRequired
  4. | `Successful
  5. | `TryLater
  6. | `Unauthorized
]
val pp_status : status Fmt.t
type cert_status = [
  1. | `Good
  2. | `Revoked of Ptime.t * X509.Extension.reason option
  3. | `Unknown
]
val pp_cert_status : cert_status Fmt.t
type single_response = X509.OCSP.Response.single_response
val create_single_response : ?next_update:Ptime.t -> ?single_extensions:X509.Extension.t -> X509.OCSP.cert_id -> cert_status -> Ptime.t -> single_response
val pp_single_response : single_response Fmt.t
val single_response_cert_id : single_response -> X509.OCSP.cert_id
val single_response_status : single_response -> cert_status
type responder_id = [
  1. | `ByKey of string
  2. | `ByName of X509.Distinguished_name.t
]
val create_responder_id : X509.Public_key.t -> responder_id
val pp_responder_id : responder_id Fmt.t
type t = X509.OCSP.Response.t
val create : [ `InternalError | `MalformedRequest | `SigRequired | `TryLater | `Unauthorized ] -> t
val pp : t Fmt.t
val status : t -> status
val responder_id : t -> (responder_id, [> `Msg of string ]) Stdlib.result
val encode_der : t -> string
val validate : t -> ?allowed_hashes:Digestif.hash' list -> ?now:Ptime.t -> X509.Public_key.t -> (unit, [> `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 ] | `Msg of string | `No_signature | `Time_invalid | `Unsupported_algorithm of X509.Distinguished_name.t * string | `Unsupported_keytype of X509.Distinguished_name.t * X509.Public_key.t ]) Stdlib.result
val create_success : ?digest:Digestif.hash' -> ?certs:Certificate.t list -> ?response_extensions:Extension.t -> Private_key.t -> responder_id -> Ptime.t -> single_response list -> t Core.Or_error.t
val responses : t -> single_response list Core.Or_error.t
val decode_der : contents:string -> t Core.Or_error.t
OCaml

Innovation. Community. Security.