diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 17:59:12 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 17:59:12 -0500 |
commit | 275ed12ff3682622dfb5cffbb6a52056fa8bf49b (patch) | |
tree | e2540cfdef94dd0c6008d7df8f7c24264354176a /Data | |
parent | b572d14100eabd30869a6886e972d988e21183cf (diff) |
SignerUserIDPacket
Diffstat (limited to 'Data')
-rw-r--r-- | Data/OpenPGP.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs index 28a0941..e3a0a54 100644 --- a/Data/OpenPGP.hs +++ b/Data/OpenPGP.hs | |||
@@ -720,6 +720,7 @@ data SignatureSubpacket = | |||
720 | authentication::Bool, | 720 | authentication::Bool, |
721 | group_key::Bool | 721 | group_key::Bool |
722 | } | | 722 | } | |
723 | SignerUserIDPacket String | | ||
723 | UnsupportedSignatureSubpacket Word8 B.ByteString | 724 | UnsupportedSignatureSubpacket Word8 B.ByteString |
724 | deriving (Show, Read, Eq) | 725 | deriving (Show, Read, Eq) |
725 | 726 | ||
@@ -813,6 +814,8 @@ put_signature_subpacket (KeyFlagsPacket certify sign encryptC encryptS split aut | |||
813 | where | 814 | where |
814 | flag x True = x | 815 | flag x True = x |
815 | flag _ False = 0x0 | 816 | flag _ False = 0x0 |
817 | put_signature_subpacket (SignerUserIDPacket userid) = | ||
818 | (B.fromString userid, 28) | ||
816 | put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) = | 819 | put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) = |
817 | (bytes, tag) | 820 | (bytes, tag) |
818 | 821 | ||
@@ -909,6 +912,9 @@ parse_signature_subpacket 27 = do | |||
909 | authentication = flag1 .&. 0x20 == 0x20, | 912 | authentication = flag1 .&. 0x20 == 0x20, |
910 | group_key = flag1 .&. 0x80 == 0x80 | 913 | group_key = flag1 .&. 0x80 == 0x80 |
911 | } | 914 | } |
915 | -- SignerUserIDPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.22 | ||
916 | parse_signature_subpacket 28 = | ||
917 | fmap (SignerUserIDPacket . B.toString) getRemainingByteString | ||
912 | -- Represent unsupported packets as their tag and literal bytes | 918 | -- Represent unsupported packets as their tag and literal bytes |
913 | parse_signature_subpacket tag = | 919 | parse_signature_subpacket tag = |
914 | fmap (UnsupportedSignatureSubpacket tag) getRemainingByteString | 920 | fmap (UnsupportedSignatureSubpacket tag) getRemainingByteString |