summaryrefslogtreecommitdiff
path: root/Data/OpenPGP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Data/OpenPGP.hs')
-rw-r--r--Data/OpenPGP.hs4
1 files changed, 2 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"