License | BSD-style |
---|---|
Maintainer | Olivier Chéron <olivier.cheron@gmail.com> |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Public keys, certificates and CRLs.
Presents an API similar to Data.X509.Memory and Data.X509.File but provides support for public-key files and allows to write objects.
Functions related to private keys are available from Crypto.Store.PKCS8.
Synopsis
- class (ASN1Object a, Eq a, Show a) => SignedObject a
- readPubKeyFile :: FilePath -> IO [PubKey]
- readPubKeyFileFromMemory :: ByteString -> [PubKey]
- pemToPubKey :: [Maybe PubKey] -> PEM -> [Maybe PubKey]
- writePubKeyFile :: FilePath -> [PubKey] -> IO ()
- writePubKeyFileToMemory :: [PubKey] -> ByteString
- pubKeyToPEM :: PubKey -> PEM
- readSignedObject :: SignedObject a => FilePath -> IO [SignedExact a]
- readSignedObjectFromMemory :: SignedObject a => ByteString -> [SignedExact a]
- writeSignedObject :: SignedObject a => FilePath -> [SignedExact a] -> IO ()
- writeSignedObjectToMemory :: SignedObject a => [SignedExact a] -> ByteString
- readPEMs :: FilePath -> IO [PEM]
- writePEMs :: FilePath -> [PEM] -> IO ()
Documentation
class (ASN1Object a, Eq a, Show a) => SignedObject a Source #
Class of signed objects convertible to PEM.
signedObjectName, otherObjectNames
Instances
SignedObject CRL Source # | |
Defined in Crypto.Store.X509 signedObjectName :: proxy CRL -> String otherObjectNames :: proxy CRL -> [String] | |
SignedObject Certificate Source # | |
Defined in Crypto.Store.X509 signedObjectName :: proxy Certificate -> String otherObjectNames :: proxy Certificate -> [String] |
Public keys
readPubKeyFileFromMemory :: ByteString -> [PubKey] Source #
Read public keys from a bytearray in PEM format.
pemToPubKey :: [Maybe PubKey] -> PEM -> [Maybe PubKey] Source #
Read a public key from a PEM
element and add it to the accumulator list.
writePubKeyFileToMemory :: [PubKey] -> ByteString Source #
Write public keys to a bytearray in PEM format.
pubKeyToPEM :: PubKey -> PEM Source #
Generate a PEM for a public key.
Signed objects
readSignedObject :: SignedObject a => FilePath -> IO [SignedExact a] Source #
Read signed objects from a PEM file (only one type at a time).
readSignedObjectFromMemory :: SignedObject a => ByteString -> [SignedExact a] Source #
Read signed objects from a bytearray in PEM format (only one type at a time).
writeSignedObject :: SignedObject a => FilePath -> [SignedExact a] -> IO () Source #
Write signed objects to a PEM file.
writeSignedObjectToMemory :: SignedObject a => [SignedExact a] -> ByteString Source #
Write signed objects to a bytearray in PEM format.