packages feed

hOpenPGP 0.13 → 0.13.1

raw patch · 4 files changed

+13/−10 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Codec/Encryption/OpenPGP/Serialize.hs view
@@ -16,13 +16,15 @@ import Data.Bits ((.&.), (.|.), shiftL, shiftR, testBit) import Data.ByteString (ByteString) import qualified Data.ByteString as B-import qualified Data.ByteString.Char8 as BC8 import Data.List (mapAccumL) import Data.Serialize (Serialize, get, put) import Data.Serialize.Get (Get, getWord8, getWord16be, getWord32be, getBytes, getByteString, getWord16le, runGet, remaining) import Data.Serialize.Put (Put, putWord8, putWord16be, putWord32be, putByteString, putWord16le, runPut) import Data.Set (Set) import qualified Data.Set as Set+import qualified Data.Text as T+import Data.Text.Encoding (decodeUtf8With, encodeUtf8)+import Data.Text.Encoding.Error (lenientDecode) import Data.Word (Word8, Word32) import Data.Maybe (fromMaybe) @@ -227,7 +229,7 @@                        return $ SigSubPacket crit (KeyFlags (bsToFFSet kfs))             | pt == 28 = do                        uid <- getByteString (l - 1)-                       return $ SigSubPacket crit (SignersUserId (BC8.unpack uid))+                       return $ SigSubPacket crit (SignersUserId (T.unpack . decodeUtf8With lenientDecode $ uid))             | pt == 29 = do                        rcode <- getWord8                        rreason <- getByteString (l - 2)@@ -334,7 +336,7 @@     putSigSubPacketType crit 27     putByteString kbs putSigSubPacket (SigSubPacket crit (SignersUserId userid)) = do-    let bs = BC8.pack userid+    let bs = encodeUtf8 . T.pack $ userid     putSubPacketLength . fromIntegral $ (1 + B.length bs)     putSigSubPacketType crit 28     putByteString bs@@ -581,7 +583,7 @@                           return $ TrustPkt tdata             | t == 13 = do                           udata <- getBytes len-                          return $ UserIdPkt (BC8.unpack udata)+                          return . UserIdPkt . T.unpack . decodeUtf8With lenientDecode $ udata             | t == 14 = do                           pkp <- getPKPayload                           return $ PublicSubkeyPkt pkp@@ -717,7 +719,7 @@     putByteString b putPkt (UserIdPkt u) = do     putWord8 (0xc0 .|. 13)-    let bs = BC8.pack u+    let bs = encodeUtf8 . T.pack $ u     putPacketLength . fromIntegral $ B.length bs     putByteString bs putPkt (PublicSubkeyPkt pkp) = do
Codec/Encryption/OpenPGP/SerializeForSigs.hs view
@@ -18,9 +18,10 @@ import Control.Lens ((^.)) import Data.ByteString (ByteString) import qualified Data.ByteString as B-import qualified Data.ByteString.Char8 as BC8 import Data.Serialize (Serialize, put) import Data.Serialize.Put (Put, putWord8, putWord16be, putWord32be, putByteString, runPut)+import qualified Data.Text as T+import Data.Text.Encoding (encodeUtf8)  import Codec.Encryption.OpenPGP.Internal (PktStreamContext(..), integerToBEBS, pubkeyToMPIs) import Codec.Encryption.OpenPGP.Serialize ()@@ -65,7 +66,7 @@ putUIDforSigning :: Pkt -> Put putUIDforSigning (UserIdPkt u) = do     putWord8 0xB4-    let bs = BC8.pack u+    let bs = encodeUtf8 . T.pack $ u     putWord32be . fromIntegral . B.length $ bs     putByteString bs putUIDforSigning _ = fail "This should never happen"
Data/Conduit/OpenPGP/Filter.hs view
@@ -128,7 +128,7 @@ 	kv V4 = 4  spEval :: SPPredicate -> SignaturePayload -> Bool-spEval (SPPredicate lhs o rhs) pkp = case (vreduce (lhs, pkp) >>= \x -> return (uncurry (opreduce o) (x,rhs))) of+spEval (SPPredicate lhs o rhs) pkp = case vreduce (lhs, pkp) >>= \x -> return (uncurry (opreduce o) (x,rhs)) of                                          Just True -> True                                          _ -> False     where
hOpenPGP.cabal view
@@ -1,5 +1,5 @@ Name:                hOpenPGP-Version:             0.13+Version:             0.13.1 Synopsis:            native Haskell implementation of OpenPGP (RFC4880) Description:         native Haskell implementation of OpenPGP (RFC4880) Homepage:            http://floss.scru.org/hOpenPGP/@@ -242,4 +242,4 @@ source-repository this   type:     git   location: git://git.debian.org/users/clint/hOpenPGP.git-  tag:      v0.13+  tag:      v0.13.1