Portability | unknown |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | Safe-Infered |
Read/Write X509 certificate
- data X509 = X509 {}
- data SignatureALG
- data HashALG
- = HashMD2
- | HashMD5
- | HashSHA1
- | HashSHA224
- | HashSHA256
- | HashSHA384
- | HashSHA512
- data PubKeyALG
- = PubKeyALG_RSA
- | PubKeyALG_DSA
- | PubKeyALG_ECDSA
- | PubKeyALG_DH
- | PubKeyALG_Unknown OID
- data PubKey
- data ASN1StringType
- type ASN1String = (ASN1StringType, String)
- data Certificate = Certificate {
- certVersion :: Int
- certSerial :: Integer
- certSignatureAlg :: SignatureALG
- certIssuerDN :: [(OID, ASN1String)]
- certSubjectDN :: [(OID, ASN1String)]
- certValidity :: (Time, Time)
- certPubKey :: PubKey
- certExtensions :: Maybe [ExtensionRaw]
- module Data.Certificate.X509.Ext
- getSigningData :: X509 -> ByteString
- decodeCertificate :: ByteString -> Either String X509
- encodeCertificate :: X509 -> ByteString
Data Structure
X509 | |
|
Data Structure (reexported from X509Cert)
data SignatureALG Source
type ASN1String = (ASN1StringType, String)Source
data Certificate Source
Certificate | |
|
module Data.Certificate.X509.Ext
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