Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Read/Write X509 certificate
- data SignatureALG
- data PubKeyALG
- = PubKeyALG_RSA
- | PubKeyALG_DSA
- | PubKeyALG_ECDSA
- | PubKeyALG_Unknown OID
- data PubKeyDesc
- data PubKey = PubKey PubKeyALG PubKeyDesc
- data Certificate = Certificate {
- certVersion :: Int
- certSerial :: Integer
- certSignatureAlg :: SignatureALG
- certIssuerDN :: [(OID, ASN1String)]
- certSubjectDN :: [(OID, ASN1String)]
- certValidity :: (Time, Time)
- certPubKey :: PubKey
- certExtensions :: Maybe CertificateExts
- certSignature :: Maybe (SignatureALG, [Word8])
- certOthers :: [ASN1]
- data ASN1StringType
- type ASN1String = (ASN1StringType, Text)
- oidCommonName :: OID
- oidCountry :: OID
- oidOrganization :: OID
- oidOrganizationUnit :: OID
- decodeCertificate :: ByteString -> Either String Certificate
- encodeCertificate :: Certificate -> ByteString
Data Structure
data SignatureALG Source
data PubKeyDesc Source
data Certificate Source
Certificate | |
|
type ASN1String = (ASN1StringType, Text)Source
some common OIDs found in certificate Distinguish Names
oidCommonName :: OIDSource
oidCountry :: OIDSource
oidOrganization :: OIDSource
oidOrganizationUnit :: OIDSource
serialization from ASN1 bytestring
decodeCertificate :: ByteString -> Either String CertificateSource
decode a X509 certificate from a bytestring
encodeCertificate :: Certificate -> ByteStringSource
encode a X509 certificate to a bytestring