summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Data/OpenPGP.hs4
-rw-r--r--tests/data/002182-002.sigbin0 -> 363 bytes
-rw-r--r--tests/suite.hs1
3 files changed, 3 insertions, 2 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs
index d6da9de..12bef74 100644
--- a/Data/OpenPGP.hs
+++ b/Data/OpenPGP.hs
@@ -887,7 +887,7 @@ put_signature_subpacket (FeaturesPacket supports_mdc) =
887put_signature_subpacket (SignatureTargetPacket kalgo halgo hash) = 887put_signature_subpacket (SignatureTargetPacket kalgo halgo hash) =
888 (B.concat [encode kalgo, encode halgo, hash], 31) 888 (B.concat [encode kalgo, encode halgo, hash], 31)
889put_signature_subpacket (EmbeddedSignaturePacket packet) = 889put_signature_subpacket (EmbeddedSignaturePacket packet) =
890 (encode (assertProp isSignaturePacket packet), 32) 890 (fst $ put_packet (assertProp isSignaturePacket packet), 32)
891put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) = 891put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) =
892 (bytes, tag) 892 (bytes, tag)
893 893
@@ -1002,7 +1002,7 @@ parse_signature_subpacket 31 =
1002 liftM3 SignatureTargetPacket get get getRemainingByteString 1002 liftM3 SignatureTargetPacket get get getRemainingByteString
1003-- EmbeddedSignaturePacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.26 1003-- EmbeddedSignaturePacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.26
1004parse_signature_subpacket 32 = 1004parse_signature_subpacket 32 =
1005 fmap (EmbeddedSignaturePacket . forceSignature) get 1005 fmap (EmbeddedSignaturePacket . forceSignature) (parse_packet 2)
1006 where 1006 where
1007 forceSignature x@(SignaturePacket {}) = x 1007 forceSignature x@(SignaturePacket {}) = x
1008 forceSignature _ = error "EmbeddedSignature must contain signature" 1008 forceSignature _ = error "EmbeddedSignature must contain signature"
diff --git a/tests/data/002182-002.sig b/tests/data/002182-002.sig
new file mode 100644
index 0000000..2bc6679
--- /dev/null
+++ b/tests/data/002182-002.sig
Binary files differ
diff --git a/tests/suite.hs b/tests/suite.hs
index 0ddc770..3094214 100644
--- a/tests/suite.hs
+++ b/tests/suite.hs
@@ -130,6 +130,7 @@ tests =
130 testCase "000076-007.secret_subkey" (testSerialization "000076-007.secret_subkey"), 130 testCase "000076-007.secret_subkey" (testSerialization "000076-007.secret_subkey"),
131 testCase "000077-002.sig" (testSerialization "000077-002.sig"), 131 testCase "000077-002.sig" (testSerialization "000077-002.sig"),
132 testCase "000078-012.ring_trust" (testSerialization "000078-012.ring_trust"), 132 testCase "000078-012.ring_trust" (testSerialization "000078-012.ring_trust"),
133 testCase "002182-002.sig" (testSerialization "002182-002.sig"),
133 testCase "pubring.gpg" (testSerialization "pubring.gpg"), 134 testCase "pubring.gpg" (testSerialization "pubring.gpg"),
134 testCase "secring.gpg" (testSerialization "secring.gpg"), 135 testCase "secring.gpg" (testSerialization "secring.gpg"),
135 testCase "compressedsig.gpg" (testSerialization "compressedsig.gpg"), 136 testCase "compressedsig.gpg" (testSerialization "compressedsig.gpg"),