openpgp 0.6 → 0.6.1
raw patch · 3 files changed
+7/−8 lines, 3 files
Files
- Data/OpenPGP.hs +4/−7
- openpgp.cabal +1/−1
- tests/suite.hs +2/−0
Data/OpenPGP.hs view
@@ -954,7 +954,7 @@ paired_sigs (Just p) (dropWhile isSignaturePacket ps) paired_sigs (Just k) (p@(UserIDPacket {}):ps) = CertificationSignature k p (takeWhile isSignaturePacket ps) :- paired_sigs (Just p) (dropWhile isSignaturePacket ps)+ paired_sigs (Just k) (dropWhile isSignaturePacket ps) paired_sigs k (_:ps) = paired_sigs k ps -- | <http://tools.ietf.org/html/rfc4880#section-3.2>@@ -1051,9 +1051,9 @@ get = do len <- fmap fromIntegral (get :: Get Word8) len <- case len of- _ | len > 190 && len < 255 -> do -- Two octet length+ _ | len >= 192 && len < 255 -> do -- Two octet length second <- fmap fromIntegral (get :: Get Word8)- return $ ((len - 192) `shiftR` 8) + second + 192+ return $ ((len - 192) `shiftL` 8) + second + 192 255 -> -- Five octet length fmap fromIntegral (get :: Get Word32) _ -> -- One octet length, no furthur processing@@ -1251,10 +1251,7 @@ liftM3 SignatureTargetPacket get get getRemainingByteString -- EmbeddedSignaturePacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.26 parse_signature_subpacket 32 =- fmap (EmbeddedSignaturePacket . forceSignature) (parse_packet 2)- where- forceSignature x@(SignaturePacket {}) = x- forceSignature _ = error "EmbeddedSignature must contain signature"+ fmap EmbeddedSignaturePacket (parse_packet 2) -- Represent unsupported packets as their tag and literal bytes parse_signature_subpacket tag = fmap (UnsupportedSignatureSubpacket tag) getRemainingByteString
openpgp.cabal view
@@ -1,5 +1,5 @@ name: openpgp-version: 0.6+version: 0.6.1 cabal-version: >= 1.8 license: OtherLicense license-file: COPYING
tests/suite.hs view
@@ -145,6 +145,8 @@ testCase "uncompressed-ops-dsa.gpg" (testSerialization "uncompressed-ops-dsa.gpg"), testCase "uncompressed-ops-dsa-sha384.txt.gpg" (testSerialization "uncompressed-ops-dsa-sha384.txt.gpg"), testCase "uncompressed-ops-rsa.gpg" (testSerialization "uncompressed-ops-rsa.gpg"),+ testCase "3F5BBA0B0694BEB6000005-002.sig" (testSerialization "3F5BBA0B0694BEB6000005-002.sig"),+ testCase "3F5BBA0B0694BEB6000017-002.sig" (testSerialization "3F5BBA0B0694BEB6000017-002.sig"), testProperty "MPI encode/decode" prop_MPI_serialization_loop, testProperty "S2K encode/decode" prop_S2K_serialization_loop, testProperty "SignatureSubpacket encode/decode" prop_SignatureSubpacket_serialization_loop