packages feed

hOpenPGP 2.5 → 2.5.1

raw patch · 7 files changed

+14/−8 lines, 7 filesbinary-added

Files

Codec/Encryption/OpenPGP/KeyringParser.hs view
@@ -42,6 +42,7 @@ import Data.Text (Text)  import Codec.Encryption.OpenPGP.Types+import Codec.Encryption.OpenPGP.Ontology (isTrustPkt) import Data.Conduit.OpenPGP.Keyring.Instances () import Text.ParserCombinators.Incremental.LeftBiasedLocal (concatMany, completeResults, feed, feedEof, inspect, Parser, satisfy) @@ -192,6 +193,4 @@ parseTKs :: Bool -> [Pkt] -> [TK] parseTKs intolerant ps = catMaybes (concatMap fst (completeResults (feedEof (feed (filter notTrustPacket ps) (many (anyTK intolerant))))))     where-            notTrustPacket (TrustPkt _) = False-            notTrustPacket _ = True-+        notTrustPacket = not . isTrustPkt
Codec/Encryption/OpenPGP/Ontology.hs view
@@ -11,6 +11,7 @@  , isSKBindingSig  , isSubkeyBindingSig  , isSubkeyRevocation+ , isTrustPkt  -- * for signature subpackets  , isCT  , isIssuerSSP@@ -46,6 +47,10 @@ isSubkeyBindingSig :: SignaturePayload -> Bool isSubkeyBindingSig (SigV4 SubkeyBindingSig _ _ _ _ _ _) = True isSubkeyBindingSig _ = False++isTrustPkt :: Pkt -> Bool+isTrustPkt (TrustPkt _) = True+isTrustPkt _ = False   isCT :: SigSubPacket -> Bool
Codec/Encryption/OpenPGP/Serialize.hs view
@@ -786,7 +786,7 @@ getPubkey _ = UnknownPKey <$> getRemainingLazyByteString  putPubkey :: PKey -> Put-putPubkey (UnknownPKey bs) = put bs+putPubkey (UnknownPKey bs) = putLazyByteString bs putPubkey p = mapM_ put (pubkeyToMPIs p)  getSecretKey :: PKPayload -> Get SKey
Data/Conduit/OpenPGP/Keyring.hs view
@@ -15,6 +15,7 @@  import Codec.Encryption.OpenPGP.KeyringParser (finalizeParsing, parseAChunk, anyTK) import Codec.Encryption.OpenPGP.Types+import Codec.Encryption.OpenPGP.Ontology (isTrustPkt) import Data.Conduit.OpenPGP.Keyring.Instances ()  data Phase = MainKey | Revs | Uids | UAts | Subs | SkippingBroken@@ -41,8 +42,7 @@ conduitToTKs' :: Monad m => Bool -> Conduit Pkt m TK conduitToTKs' intolerant = CL.filter notTrustPacket =$= CL.map (:[]) =$= fakecmAccum finalizeParsing (parseAChunk (anyTK intolerant)) ([], Just (Nothing, anyTK intolerant)) =$= CL.catMaybes     where-        notTrustPacket (TrustPkt _) = False-        notTrustPacket _ = True+        notTrustPacket = not . isTrustPkt  sinkKeyringMap :: Monad m => Sink TK m Keyring sinkKeyringMap = CL.fold (flip insert) empty
hOpenPGP.cabal view
@@ -1,5 +1,5 @@ Name:                hOpenPGP-Version:             2.5+Version:             2.5.1 Synopsis:            native Haskell implementation of OpenPGP (RFC4880) Description:         native Haskell implementation of OpenPGP (RFC4880), plus Camellia (RFC5581) Homepage:            http://floss.scru.org/hOpenPGP/@@ -146,6 +146,7 @@   , tests/data/sigs-with-regexes   , tests/data/gnu-dummy-s2k-101-secret-key.gpg   , tests/data/debian-keyring.gpg+  , tests/data/anibal-ed25519.gpg  Cabal-version:       >= 1.10 @@ -336,4 +337,4 @@ source-repository this   type:     git   location: git://git.debian.org/users/clint/hOpenPGP.git-  tag:      v2.5+  tag:      v2.5.1
+ tests/data/anibal-ed25519.gpg view

binary file changed (absent → 389 bytes)

tests/suite.hs view
@@ -274,6 +274,7 @@    , testCase "v3-genericcert.sig" (testSerialization "v3-genericcert.sig")    , testCase "sigs-with-regexes" (testSerialization "sigs-with-regexes")    , testCase "gnu-dummy-s2k-101-secret-key.gpg" (testSerialization "gnu-dummy-s2k-101-secret-key.gpg")+   , testCase "anibal-ed25519.gpg" (testSerialization "anibal-ed25519.gpg")    ],   testGroup "KeyID/fingerprint group" [      testCase "v3 key" (testKeyIDandFingerprint "v3.key" "C7261095/CBD9 F412 6807 E405 CC2D  2712 1DF5 E86E")