crypton-x509-store 1.6.14 → 1.10.0
raw patch · 5 files changed
Files
- ChangeLog.md +24/−4
- Data/X509/CertificateStore.hs +3/−3
- Data/X509/File.hs +4/−7
- Data/X509/Memory.hs +3/−0
- crypton-x509-store.cabal +7/−7
ChangeLog.md view
@@ -1,11 +1,31 @@ # ChangeLog for crypton-x509-store -## 1.6.14+## 1.10.0 -* Recovering build on Windows.- [#27](https://github.com/kazu-yamamoto/crypton-certificate/pull/27)+* Read ML-DSA private keys+ [#35](https://github.com/kazu-yamamoto/crypton-certificate/pull/35)+* Follow the breaking change in `crypton-x509` 1.10.0+ [#35](https://github.com/kazu-yamamoto/crypton-certificate/pull/35) -## 1.6.13+## 1.9.0++* Using "ram" instead of "memory"+ [#29](https://github.com/kazu-yamamoto/crypton-certificate/pull/29)++## v1.8.0++* Depend on package `crypton-asn1-types >= 0.4.1` rather than `asn1-types`.+ ASN.1-related types and classes are now those from the former package.+ [#18](https://github.com/kazu-yamamoto/crypton-certificate/pull/18)+* Swap crypton-pem for existing unmaintained pem dependency.+ [#16](https://github.com/kazu-yamamoto/crypton-certificate/pull/16)++## v1.6.14++* Defining MIN_VERSION_unix if not defined.+ [#27](https://github.com/kazu-yamamoto/crypton-certificate/issues/27)++## v1.6.13 * Making buildable with ghc-9.4 and ghc-9.2. [#23](https://github.com/kazu-yamamoto/crypton-certificate/pull/23)
Data/X509/CertificateStore.hs view
@@ -20,7 +20,6 @@ #else import Data.Monoid #endif-import Control.Applicative ((<$>)) import qualified Control.Exception as E import Control.Monad (filterM, mplus) import qualified Data.ByteString as B@@ -33,6 +32,7 @@ getDirectoryContents, ) import System.FilePath ((</>))+import qualified System.IO.Error as E -- | A Collection of certificate or store of certificates. data CertificateStore@@ -107,7 +107,7 @@ -- The file may contains multiple certificates readCertificates :: FilePath -> IO [SignedCertificate] readCertificates file =- E.catch+ E.catchIOError (either (const []) (rights . map getCert) . pemParseBS <$> B.readFile file) skipIOError where@@ -130,7 +130,7 @@ isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x) getDirContents =- E.catch+ E.catchIOError (map (path </>) . filter isCert <$> getDirectoryContents path) emptyPaths where
Data/X509/File.hs view
@@ -10,14 +10,11 @@ #define MIN_VERSION_unix(x, y, z) 0 #endif -import Control.Applicative-import Control.Exception (Exception (..), throw)-import Data.ASN1.BinaryEncoding-import Data.ASN1.Encoding+import qualified Control.Exception as E import Data.ASN1.Types import qualified Data.ByteString.Lazy as L import Data.Maybe-import Data.PEM (PEM, pemContent, pemName, pemParseLBS)+import Data.PEM (PEM, pemContent, pemParseLBS) import qualified Data.X509 as X509 import Data.X509.Memory (pemToKey) #if defined(MIN_VERSION_unix) && MIN_VERSION_unix(2,8,0)@@ -27,7 +24,7 @@ newtype PEMError = PEMError {displayPEMError :: String} deriving (Show) -instance Exception PEMError where+instance E.Exception PEMError where displayException = displayPEMError readPEMs :: FilePath -> IO [PEM]@@ -39,7 +36,7 @@ #else content <- L.readFile filepath #endif- either (throw . PEMError) pure $ pemParseLBS content+ either (E.throw . PEMError) pure $ pemParseLBS content -- | return all the signed objects in a file. --
Data/X509/Memory.hs view
@@ -76,6 +76,9 @@ Right (k@(X509.PrivKeyX448 _), _) -> Just k Right (k@(X509.PrivKeyEd25519 _), _) -> Just k Right (k@(X509.PrivKeyEd448 _), _) -> Just k+ Right (k@(X509.PrivKeyMLDSA44 _), _) -> Just k+ Right (k@(X509.PrivKeyMLDSA65 _), _) -> Just k+ Right (k@(X509.PrivKeyMLDSA87 _), _) -> Just k _ -> Nothing dsaFromASN1 :: [ASN1] -> Either String (DSA.KeyPair, [ASN1])
crypton-x509-store.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: crypton-x509-store-version: 1.6.14+version: 1.10.0 license: BSD3 license-file: LICENSE copyright: Vincent Hanquez <vincent@snarc.org>@@ -32,15 +32,15 @@ build-depends: base >=3 && <5, bytestring,- mtl, containers,+ crypton >=1.1.0 && <2.3,+ crypton-asn1-encoding >=0.10.0 && <0.11,+ crypton-asn1-types >=0.4.1 && <0.5,+ crypton-pem >=0.2.4 && <0.4,+ crypton-x509 >=1.10 && <1.11, directory, filepath,- pem >=0.1 && <0.3,- asn1-types >=0.3 && <0.4,- asn1-encoding >=0.9 && <0.10,- crypton,- crypton-x509 >=1.7.2+ mtl if !os(windows) build-depends: unix