certificate-0.3.2: Certificates and Key Reader/WriterContentsIndex
Data.Certificate.X509
Portabilityunknown
Stabilityexperimental
MaintainerVincent Hanquez <vincent@snarc.org>
Contents
Data Structure
serialization from ASN1 bytestring
Description
Read/Write X509 certificate
Synopsis
data PubKeyDesc
= PubKeyRSA (Int, Integer, Integer)
| PubKeyDSA (Integer, Integer, Integer, Integer)
| PubKeyUnknown [Word8]
data PubKey = PubKey SignatureALG PubKeyDesc
data CertificateDN = CertificateDN {
cdnCommonName :: Maybe String
cdnCountry :: Maybe String
cdnOrganization :: Maybe String
cdnOrganizationUnit :: Maybe String
cdnOthers :: [(OID, String)]
}
data Certificate = Certificate {
certVersion :: Int
certSerial :: Integer
certSignatureAlg :: SignatureALG
certIssuerDN :: CertificateDN
certSubjectDN :: CertificateDN
certValidity :: (Time, Time)
certPubKey :: PubKey
certExtensions :: Maybe CertificateExts
certSignature :: Maybe (SignatureALG, [Word8])
certOthers :: [ASN1]
}
decodeCertificate :: ByteString -> Either String Certificate
encodeCertificate :: Certificate -> ByteString
Data Structure
data PubKeyDesc
Constructors
PubKeyRSA (Int, Integer, Integer)RSA format with (len modulus, modulus, e)
PubKeyDSA (Integer, Integer, Integer, Integer)DSA format with (pub, p, q, g)
PubKeyUnknown [Word8]unrecognized format
show/hide Instances
data PubKey
Constructors
PubKey SignatureALG PubKeyDesc
show/hide Instances
data CertificateDN
Constructors
CertificateDN
cdnCommonName :: Maybe StringCertificate DN Common Name
cdnCountry :: Maybe StringCertificate DN Country of Issuance
cdnOrganization :: Maybe StringCertificate DN Organization
cdnOrganizationUnit :: Maybe StringCertificate DN Organization Unit
cdnOthers :: [(OID, String)]Certificate DN Other Attributes
show/hide Instances
data Certificate
Constructors
Certificate
certVersion :: IntCertificate Version
certSerial :: IntegerCertificate Serial number
certSignatureAlg :: SignatureALGCertificate Signature algorithm
certIssuerDN :: CertificateDNCertificate Issuer DN
certSubjectDN :: CertificateDNCertificate Subject DN
certValidity :: (Time, Time)Certificate Validity period
certPubKey :: PubKeyCertificate Public key
certExtensions :: Maybe CertificateExtsCertificate Extensions
certSignature :: Maybe (SignatureALG, [Word8])Certificate Signature Algorithm and Signature
certOthers :: [ASN1]any others fields not parsed
show/hide Instances
serialization from ASN1 bytestring
decodeCertificate :: ByteString -> Either String Certificate
decode a X509 certificate from a bytestring
encodeCertificate :: Certificate -> ByteString
encode a X509 certificate to a bytestring
Produced by Haddock version 2.7.2