-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Certificates and Key Reader/Writer -- -- Certificates and Key reader/writer -- -- At the moment only X509 certificate and unencrypted private key are -- supported, but will include PGP certificate and pkcs8 private keys @package certificate @version 0.3.2 -- | Read/Write Private Key module Data.Certificate.Key data PrivateKey PrivateKey :: Int -> Int -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> Integer -> PrivateKey privKey_version :: PrivateKey -> Int privKey_lenmodulus :: PrivateKey -> Int privKey_modulus :: PrivateKey -> Integer privKey_public_exponant :: PrivateKey -> Integer privKey_private_exponant :: PrivateKey -> Integer privKey_p1 :: PrivateKey -> Integer privKey_p2 :: PrivateKey -> Integer privKey_exp1 :: PrivateKey -> Integer privKey_exp2 :: PrivateKey -> Integer privKey_coef :: PrivateKey -> Integer decodePrivateKey :: ByteString -> Either String PrivateKey encodePrivateKey :: PrivateKey -> ByteString -- | Read PEM files module Data.Certificate.PEM parsePEMCert :: ByteString -> Maybe ByteString parsePEMCertReq :: ByteString -> Maybe ByteString parsePEMKey :: ByteString -> Maybe ByteString parsePEMKeyRSA :: ByteString -> Maybe ByteString parsePEMKeyDSA :: ByteString -> Maybe ByteString parsePEMs :: ByteString -> [PEM] -- | Read/Write X509 certificate module Data.Certificate.X509 data PubKeyDesc -- | RSA format with (len modulus, modulus, e) PubKeyRSA :: (Int, Integer, Integer) -> PubKeyDesc -- | DSA format with (pub, p, q, g) PubKeyDSA :: (Integer, Integer, Integer, Integer) -> PubKeyDesc -- | unrecognized format PubKeyUnknown :: [Word8] -> PubKeyDesc data PubKey PubKey :: SignatureALG -> PubKeyDesc -> PubKey data CertificateDN CertificateDN :: Maybe String -> Maybe String -> Maybe String -> Maybe String -> [(OID, String)] -> CertificateDN -- | Certificate DN Common Name cdnCommonName :: CertificateDN -> Maybe String -- | Certificate DN Country of Issuance cdnCountry :: CertificateDN -> Maybe String -- | Certificate DN Organization cdnOrganization :: CertificateDN -> Maybe String -- | Certificate DN Organization Unit cdnOrganizationUnit :: CertificateDN -> Maybe String -- | Certificate DN Other Attributes cdnOthers :: CertificateDN -> [(OID, String)] data Certificate Certificate :: Int -> Integer -> SignatureALG -> CertificateDN -> CertificateDN -> (Time, Time) -> PubKey -> Maybe CertificateExts -> Maybe (SignatureALG, [Word8]) -> [ASN1] -> Certificate -- | Certificate Version certVersion :: Certificate -> Int -- | Certificate Serial number certSerial :: Certificate -> Integer -- | Certificate Signature algorithm certSignatureAlg :: Certificate -> SignatureALG -- | Certificate Issuer DN certIssuerDN :: Certificate -> CertificateDN -- | Certificate Subject DN certSubjectDN :: Certificate -> CertificateDN -- | Certificate Validity period certValidity :: Certificate -> (Time, Time) -- | Certificate Public key certPubKey :: Certificate -> PubKey -- | Certificate Extensions certExtensions :: Certificate -> Maybe CertificateExts -- | Certificate Signature Algorithm and Signature certSignature :: Certificate -> Maybe (SignatureALG, [Word8]) -- | any others fields not parsed certOthers :: Certificate -> [ASN1] -- | decode a X509 certificate from a bytestring decodeCertificate :: ByteString -> Either String Certificate -- | encode a X509 certificate to a bytestring encodeCertificate :: Certificate -> ByteString instance Monad ParseCert instance MonadError String ParseCert instance Show Certificate instance Eq Certificate instance Show CertificateExts instance Eq CertificateExts instance Show CertKeyUsage instance Eq CertKeyUsage instance Show CertificateDN instance Eq CertificateDN instance Show PubKey instance Eq PubKey instance Show PubKeyDesc instance Eq PubKeyDesc instance Show SignatureALG instance Eq SignatureALG