package x509

  1. Overview
  2. Docs

Encodings

ASN.1 Encoding

val parse : Cstruct.t -> t option

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

val cs_of_cert : t -> Cstruct.t

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

val distinguished_name_of_cs : Cstruct.t -> distinguished_name option

distinguished_name_of_cs cs is dn, the ASN.1 decoded distinguished name of cs.

val cs_of_distinguished_name : 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 -> CA.signing_request option

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

val cs_of_signing_request : 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 public_key_to_cstruct : public_key -> Cstruct.t

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

val public_key_of_cstruct : Cstruct.t -> public_key option

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

val crl_to_cstruct : 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 -> 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

OCaml

Innovation. Community. Security.