Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Read/Write X509 certificate
- data X509 = X509 Certificate (Maybe ByteString) SignatureALG [Word8]
- data SignatureALG
- data PubKeyALG
- = PubKeyALG_RSA
- | PubKeyALG_DSA
- | PubKeyALG_ECDSA
- | PubKeyALG_Unknown OID
- data PubKeyDesc
- data PubKey = PubKey PubKeyALG PubKeyDesc
- data ASN1StringType
- type ASN1String = (ASN1StringType, Text)
- data Certificate = Certificate {
- certVersion :: Int
- certSerial :: Integer
- certSignatureAlg :: SignatureALG
- certIssuerDN :: [(OID, ASN1String)]
- certSubjectDN :: [(OID, ASN1String)]
- certValidity :: (Time, Time)
- certPubKey :: PubKey
- certExtensions :: Maybe CertificateExts
- data CertificateExts = CertificateExts {
- certExtKeyUsage :: Maybe (Bool, [CertKeyUsage])
- certExtBasicConstraints :: Maybe (Bool, Bool)
- certExtSubjectKeyIdentifier :: Maybe (Bool, [Word8])
- certExtPolicies :: Maybe Bool
- certExtOthers :: [(OID, Bool, [ASN1])]
- decodeCertificate :: ByteString -> Either String X509
- encodeCertificate :: X509 -> ByteString
Data Structure
Data Structure (reexported from X509Cert)
data SignatureALG Source
data PubKeyDesc Source
type ASN1String = (ASN1StringType, Text)Source
data Certificate Source
Certificate | |
|
data CertificateExts Source
CertificateExts | |
|
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