hOpenPGP 2.7.3 → 2.7.4
raw patch · 2 files changed
+12/−7 lines, 2 files
Files
Codec/Encryption/OpenPGP/KeyringParser.hs view
@@ -36,7 +36,7 @@ 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)+import Text.ParserCombinators.Incremental.LeftBiasedLocal (concatMany, completeResults, failure, feed, feedEof, inspect, Parser, satisfy) parseAChunk :: (Monoid s, Show s) => Parser s r -> s -> ([(r, s)], Maybe (Maybe (r -> r), Parser s r)) -> (([(r, s)], Maybe (Maybe (r -> r), Parser s r)), [r]) parseAChunk _ a ([], Nothing) = error $ "Failure before " ++ show a@@ -114,8 +114,11 @@ signature :: Bool -> [SigType] -> Parser [Pkt] [SignaturePayload] signature intolerant rts = if intolerant then signature' else signature' <|> brokensig' where- signature' = do [SignaturePkt sp] <- satisfy (isSP intolerant)- return $! (if intolerant then id else filter isSP') [sp]+ signature' = do+ spks <- satisfy (isSP intolerant)+ case spks of+ [SignaturePkt sp] -> return $! (if intolerant then id else filter isSP') [sp]+ _ -> failure brokensig' = const [] <$> broken 2 isSP True [SignaturePkt sp@SigV3{}] = isSP' sp isSP True [SignaturePkt sp@SigV4{}] = isSP' sp@@ -175,8 +178,10 @@ isSKP _ = False broken :: Int -> Parser [Pkt] Pkt-broken t = do [bp] <- satisfy isBroken- return bp+broken t = do bpkts <- satisfy isBroken+ case bpkts of+ [bp] -> return bp+ _ -> failure where isBroken [BrokenPacketPkt _ a _] = t == fromIntegral a isBroken _ = False
hOpenPGP.cabal view
@@ -1,5 +1,5 @@ Name: hOpenPGP-Version: 2.7.3+Version: 2.7.4 Synopsis: native Haskell implementation of OpenPGP (RFC4880) Description: native Haskell implementation of OpenPGP (RFC4880), plus Camellia (RFC5581), plus ECC (RFC6637) Homepage: https://salsa.debian.org/clint/hOpenPGP@@ -342,4 +342,4 @@ source-repository this type: git location: https://salsa.debian.org/clint/hOpenPGP.git- tag: v2.7.3+ tag: v2.7.4