certificate-0.8.1: Certificates and Key Reader/Writer

Portabilityunknown
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>

Data.Certificate.X509

Contents

Description

Read/Write X509 certificate

Synopsis

Data Structure

Data Structure (reexported from X509Cert)

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

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 CertificateExts

Certificate Extensions

helper for signing/veryfing certificate

getSigningData :: X509 -> ByteStringSource

get signing data related to a X509 message, - which is either the cached data or the encoded certificate

serialization from ASN1 bytestring

decodeCertificate :: ByteString -> Either String X509Source

decode an X509 from a bytestring - the structure is the following: - Certificate - Certificate Signature Algorithm - Certificate Signature

encodeCertificate :: X509 -> ByteStringSource

encode a X509 certificate to a bytestring