-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | X.509 collection accessing and storing methods
--   
--   X.509 collection accessing and storing methods for certificate, crl,
--   exception list
@package crypton-x509-store
@version 1.6.12

module Data.X509.CertificateStore

-- | A Collection of certificate or store of certificates.
data CertificateStore
isEmptyCertificateStore :: CertificateStore -> Bool

-- | Create a certificate store out of a list of X509 certificate
makeCertificateStore :: [SignedCertificate] -> CertificateStore

-- | Create certificate store by reading certificates from file or
--   directory
--   
--   This function can be used to read multiple certificates from either
--   single file (multiple PEM formatted certificates concanated) or
--   directory (one certificate per file, file names are hashes from
--   certificate).
readCertificateStore :: FilePath -> IO (Maybe CertificateStore)
readCertificates :: FilePath -> IO [SignedCertificate]

-- | Find a certificate using the subject distinguished name
findCertificate :: DistinguishedName -> CertificateStore -> Maybe SignedCertificate

-- | List all certificates in a store
listCertificates :: CertificateStore -> [SignedCertificate]
instance GHC.Internal.Base.Monoid Data.X509.CertificateStore.CertificateStore
instance GHC.Internal.Base.Semigroup Data.X509.CertificateStore.CertificateStore


module Data.X509.Memory
readKeyFileFromMemory :: ByteString -> [PrivKey]
readSignedObjectFromMemory :: (ASN1Object a, Eq a, Show a) => ByteString -> [SignedExact a]
pemToKey :: [Maybe PrivKey] -> PEM -> [Maybe PrivKey]

module Data.X509.File

-- | return all the signed objects in a file.
--   
--   (only one type at a time).
readSignedObject :: (ASN1Object a, Eq a, Show a) => FilePath -> IO [SignedExact a]

-- | return all the private keys that were successfully read from a file.
readKeyFile :: FilePath -> IO [PrivKey]
newtype PEMError
PEMError :: String -> PEMError
[displayPEMError] :: PEMError -> String
instance GHC.Internal.Exception.Type.Exception Data.X509.File.PEMError
instance GHC.Internal.Show.Show Data.X509.File.PEMError
