type status = [
| `InternalError
| `MalformedRequest
| `SigRequired
| `Successful
| `TryLater
| `Unauthorized
]
type cert_status = [
| `Good
| `Revoked of Ptime.t * X509.Extension.reason option
| `Unknown
]
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
type responder_id = [
| `ByKey of string
| `ByName of X509.Distinguished_name.t
]
type t = X509.OCSP.Response.t
val create :
[ `InternalError
| `MalformedRequest
| `SigRequired
| `TryLater
| `Unauthorized ] ->
t
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 decode_der : contents:string -> t Core.Or_error.t