package x509
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=237c2a5e6d7490f5d14510188c6f47b257e6368d91516580931c7994d3108e12
sha512=b8cabf3b0a6d4f6e6c6b22e401207fe12666d01a266132c0929453c11bbd6a82d4726b809ef8c3a5b47cb8da54e8e74942e33872a6e09df01ea35f4c868b238b
doc/x509/X509/Certificate/index.html
Module X509.CertificateSource
X509v3 certificate
val decode_pkcs1_digest_info :
Cstruct.t ->
(Nocrypto.Hash.hash * Cstruct.t, [> Rresult.R.msg ]) Rresult.resultdecode_pkcs1_digest_info buffer is hash, signature, the hash and raw signature of the given buffer in ASN.1 DER encoding, or an error.
val encode_pkcs1_digest_info : (Nocrypto.Hash.hash * Cstruct.t) -> Cstruct.tencode_pkcs1_digest_info (hash, signature) is data, the ASN.1 DER encoded hash and signature.
Abstract certificate type
Encoding and decoding in ASN.1 DER and PEM format
val decode_der : Cstruct.t -> (t, [> Rresult.R.msg ]) Rresult.resultdecode_der cstruct is certificate, the ASN.1 decoded certificate or an error.
encode_der certificate is cstruct, the ASN.1 encoded representation of the certificate.
val decode_pem_multiple :
Cstruct.t ->
(t list, [> Rresult.R.msg ]) Rresult.resultdecode_pem_multiple pem is t list, where all certificates of the pem are extracted
val decode_pem : Cstruct.t -> (t, [> Rresult.R.msg ]) Rresult.resultdecode_pem pem is t, where the single certificate of the pem is extracted
encode_pem_multiple certificates is pem, the pem encoded certificates.
Operations on certificates
The polymorphic variant of public key types.
supports_keytype certificate key_type is result, whether public key of the certificate matches the given key_type.
val public_key : t -> Public_key.tpublic_key certificate is pk, the public key of the certificate.
val hostnames : t -> Domain_name.Set.thostnames certficate are hostnames, the list of hostnames this certificate is valid for. Currently, these are the DNS names of the Subject Alternative Name extension, if present, or otherwise the singleton list containing the common name.
type host = [ `Strict | `Wildcard ] * [ `host ] Domain_name.tThe polymorphic variant for hostname validation.
supports_hostname certificate host is result, whether the certificate contains the given host, using hostnames.
val fingerprint : Nocrypto.Hash.hash -> t -> Cstruct.tfingerprint hash cert is digest, the digest of cert using the specified hash algorithm
val subject : t -> Distinguished_name.tsubject certificate is dn, the subject as dn of the certificate.
val issuer : t -> Distinguished_name.tissuer certificate is dn, the issuer as dn of the certificate.
val serial : t -> Z.tserial certificate is sn, the serial number of the certificate.
validity certificate is from, until, the validity of the certificate.
val extensions : t -> Extension.textensions certificate is the extension map of certificate.