Library
Module
Module type
Parameter
Class
Class type
X.509v3 extensions
type key_usage = [
| `Digital_signature
| `Content_commitment
| `Key_encipherment
| `Data_encipherment
| `Key_agreement
| `Key_cert_sign
| `CRL_sign
| `Encipher_only
| `Decipher_only
]
The polymorphic variant of key usages.
supports_usage ~not_present certificate key_usage
is result
, whether the certificate
supports the given key_usage
(defaults to ~not_present
if the certificate does not contain a keyUsage extension).
type extended_key_usage = [
| `Any
| `Server_auth
| `Client_auth
| `Code_signing
| `Email_protection
| `Ipsec_end
| `Ipsec_tunnel
| `Ipsec_user
| `Time_stamping
| `Ocsp_signing
| `Other of Asn.OID.t
]
The polymorphic variant of extended key usages.
val supports_extended_usage :
?not_present:bool ->
t ->
extended_key_usage ->
bool
supports_extended_usage ~not_present certificate
extended_key_usage
is result
, whether the certificate
supports the given extended_key_usage
(defaults to ~not_present
if the certificate does not contain an extendedKeyUsage extension.
type general_name = [
| `Other of Asn.OID.t * string
| `Rfc_822 of string
| `DNS of string
| `X400_address of unit
| `Directory of distinguished_name
| `EDI_party of string option * string
| `URI of string
| `IP of Cstruct.t
| `Registered_id of Asn.OID.t
]
A list of general_name
s is the value of both subjectAltName and IssuerAltName extension.
type authority_key_id = Cstruct.t option * general_name list * Z.t option
The authority key identifier, as present in the Authority Key Identifier extension.
type priv_key_usage_period = [
| `Interval of Asn.Time.t * Asn.Time.t
| `Not_after of Asn.Time.t
| `Not_before of Asn.Time.t
]
The private key usage period, as defined in RFC 3280.
type name_constraint = (general_name * int * int option) list
Name constraints, as defined in RFC 5280.
Certificate policies, the policy extension.
type t = [
| `Unsupported of Asn.OID.t * Cstruct.t
| `Subject_alt_name of general_name list
| `Authority_key_id of authority_key_id
| `Subject_key_id of Cstruct.t
| `Issuer_alt_name of general_name list
| `Key_usage of key_usage list
| `Ext_key_usage of extended_key_usage list
| `Basic_constraints of bool * int option
| `Priv_key_period of priv_key_usage_period
| `Name_constraints of name_constraint * name_constraint
| `Policies of policy list
]
The polymorphic variant of X509v3 extensions.