certificate-0.9.5: Certificates and Key Reader/Writer

Data.Certificate.X509.Cert

Contents

Synopsis

Data Structure

data PubKey Source

Constructors

PubKeyRSA (Int, Integer, Integer)

RSA format with (len modulus, modulus, e)

PubKeyDSA (Integer, Integer, Integer, Integer)

DSA format with (pub, p, q, g)

PubKeyDH (Integer, Integer, Integer, Maybe Integer, ([Word8], Integer))

DH format with (p,g,q,j,(seed,pgenCounter))

PubKeyECDSA [ASN1]

ECDSA format not done yet FIXME

PubKeyUnknown OID [Word8]

unrecognized format

Instances

type CertificateExt = (OID, Bool, [ASN1])Source

data Certificate Source

Constructors

Certificate 

Fields

certVersion :: Int

Certificate Version

certSerial :: Integer

Certificate Serial number

certSignatureAlg :: SignatureALG

Certificate Signature algorithm

certIssuerDN :: [(OID, ASN1String)]

Certificate Issuer DN

certSubjectDN :: [(OID, ASN1String)]

Certificate Subject DN

certValidity :: (Time, Time)

Certificate Validity period

certPubKey :: PubKey

Certificate Public key

certExtensions :: Maybe [CertificateExt]

Certificate Extensions

certificate to/from asn1

parseCertificate :: ParseASN1 CertificateSource

parse header structure of a x509 certificate. the structure the following: Version Serial Number Algorithm ID Issuer Validity Not Before Not After Subject Subject Public Key Info Public Key Algorithm Subject Public Key Issuer Unique Identifier (Optional) (>= 2) Subject Unique Identifier (Optional) (>= 2) Extensions (Optional) (>= v3)