Module X509.Encoding

module Encoding: sig .. end

Encodings


ASN.1 Encoding

val parse : Cstruct.t -> X509.t option

parse cstruct is certificate option, the ASN.1 decoded certificate or None.

val cs_of_cert : X509.t -> Cstruct.t

cs_of_cert certificate is cstruct, the ASN.1 encoded representation of the certificate.

val cs_of_distinguished_name : X509.distinguished_name -> Cstruct.t

cs_of_distinguished_name dn is cstruct, the ASN.1 encoded representation of the distinguished name dn.

val parse_signing_request : Cstruct.t -> X509.CA.signing_request option

parse_signing_request cstruct is signing_request option, the ASN.1 decoded cstruct or None.

val cs_of_signing_request : X509.CA.signing_request -> Cstruct.t

cs_of_signing_request sr is cstruct, the ASN.1 encoded representation of the sr.

val pkcs1_digest_info_of_cstruct : Cstruct.t -> (Nocrypto.Hash.hash * Cstruct.t) option

pkcs1_digest_info_of_cstruct data is hash, signature option, the hash and raw signature.

val pkcs1_digest_info_to_cstruct : Nocrypto.Hash.hash * Cstruct.t -> Cstruct.t

pkcs1_digest_info_to_cstruct (hash, signature) is data, the encoded hash and signature.

val rsa_public_to_cstruct : Nocrypto.Rsa.pub -> Cstruct.t

rsa_public_to_cstruct pk is buffer, the ASN.1 encoding of the given public key.

val rsa_public_of_cstruct : Cstruct.t -> Nocrypto.Rsa.pub option

rsa_public_of_cstruct buffer is pubkey, the public key of the ASN.1 encoded buffer.

val crl_to_cstruct : X509.CRL.c -> Cstruct.t

crl_to_cstruct crl is buffer, the ASN.1 DER encoding of the given certificate revocation list.

val crl_of_cstruct : Cstruct.t -> X509.CRL.c option

crl_of_cstruct buffer is crl, the certificate revocation list of the ASN.1 encoded buffer.

module Pem: sig .. end

Parser and unparser of PEM files