packages feed

certificate 1.2.0 → 1.2.1

raw patch · 2 files changed

+8/−7 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ System.Certificate.X509.MacOS: findCertificate :: (X509 -> Bool) -> IO (Maybe X509)
+ System.Certificate.X509.Unix: findCertificate :: (X509 -> Bool) -> IO (Maybe X509)
+ System.Certificate.X509.Unix: getSystemPath :: IO FilePath
+ System.Certificate.X509.Unix: readAll :: IO [X509]

Files

System/Certificate/X509/MacOS.hs view
@@ -2,6 +2,7 @@ 	( findCertificate 	) where +import Data.PEM (pemParseLBS, PEM(..)) import Data.Certificate.X509 import System.Process import Data.ByteString hiding (filter, map)@@ -16,7 +17,7 @@ findCertificate :: (X509 -> Bool) -> IO (Maybe X509) findCertificate f = do   (_, Just hout, _, ph) <- createProcess (proc "security" ["find-certificate", "-pa", keyChain]) { std_out = CreatePipe }-  pems <- parsePEMs <$> hGetContents hout+  pems <- either error id . pemParseLBS <$> LBS.hGetContents hout   _ <- waitForProcess ph-  let targets = rights $ map (decodeCertificate . LBS.fromChunks .  pure . snd) $ filter ((=="CERTIFICATE") . fst) pems+  let targets = rights $ map (decodeCertificate . LBS.fromChunks .  pure . pemContent) $ filter ((=="CERTIFICATE") . pemName) pems   return $ listToMaybe $ filter f targets
certificate.cabal view
@@ -1,5 +1,5 @@ Name:                certificate-Version:             1.2.0+Version:             1.2.1 Description:     Certificates and Key reader/writer     .@@ -33,6 +33,7 @@                    , asn1-data >= 0.6.1.3 && < 0.7                    , crypto-pubkey-types                    , directory+                   , process                    , time   Exposed-modules:   Data.Certificate.X509                      Data.Certificate.X509.Cert@@ -40,17 +41,16 @@                      Data.Certificate.KeyDSA                      Data.Certificate.KeyRSA                      System.Certificate.X509-  Other-modules:     Data.Certificate.X509.Internal                      System.Certificate.X509.Unix+                     System.Certificate.X509.MacOS+  Other-modules:     Data.Certificate.X509.Internal   ghc-options:       -Wall   if os(windows)      cpp-options: -DWINDOWS      Build-Depends:  Win32-     Other-modules:  System.Certificate.X509.Win32+     Exposed-modules:  System.Certificate.X509.Win32   if os(OSX)      cpp-options: -DMACOSX-     Build-Depends:  process-     Other-modules:  System.Certificate.X509.MacOS  Executable           certificate   Main-Is:           Certificate.hs