diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 17:39:13 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 17:39:13 -0500 |
commit | 35a71015787428c322a2f06068965cdff1f2f200 (patch) | |
tree | d7fe0ac253e3b573815f0dbc80a948911379592f /Data | |
parent | 996a38e28204b33429f5064386bfd54709d06d6e (diff) |
PolicyURIPacket
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 16f7d81..8128a2d 100644 --- a/Data/OpenPGP.hs +++ b/Data/OpenPGP.hs | |||
@@ -710,6 +710,7 @@ data SignatureSubpacket = | |||
710 | KeyServerPreferencesPacket {keyserver_no_modify::Bool} | | 710 | KeyServerPreferencesPacket {keyserver_no_modify::Bool} | |
711 | PreferredKeyServerPacket String | | 711 | PreferredKeyServerPacket String | |
712 | PrimaryUserIDPacket Bool | | 712 | PrimaryUserIDPacket Bool | |
713 | PolicyURIPacket String | | ||
713 | UnsupportedSignatureSubpacket Word8 B.ByteString | 714 | UnsupportedSignatureSubpacket Word8 B.ByteString |
714 | deriving (Show, Read, Eq) | 715 | deriving (Show, Read, Eq) |
715 | 716 | ||
@@ -788,6 +789,8 @@ put_signature_subpacket (PreferredKeyServerPacket uri) = | |||
788 | (B.fromString uri, 24) | 789 | (B.fromString uri, 24) |
789 | put_signature_subpacket (PrimaryUserIDPacket isprimary) = | 790 | put_signature_subpacket (PrimaryUserIDPacket isprimary) = |
790 | (encode $ enum_to_word8 isprimary, 25) | 791 | (encode $ enum_to_word8 isprimary, 25) |
792 | put_signature_subpacket (PolicyURIPacket uri) = | ||
793 | (B.fromString uri, 26) | ||
791 | put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) = | 794 | put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) = |
792 | (bytes, tag) | 795 | (bytes, tag) |
793 | 796 | ||
@@ -868,6 +871,9 @@ parse_signature_subpacket 24 = | |||
868 | -- PrimaryUserIDPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.19 | 871 | -- PrimaryUserIDPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.19 |
869 | parse_signature_subpacket 25 = | 872 | parse_signature_subpacket 25 = |
870 | fmap (PrimaryUserIDPacket . enum_from_word8) get | 873 | fmap (PrimaryUserIDPacket . enum_from_word8) get |
874 | -- PolicyURIPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.20 | ||
875 | parse_signature_subpacket 26 = | ||
876 | fmap (PolicyURIPacket . B.toString) getRemainingByteString | ||
871 | -- Represent unsupported packets as their tag and literal bytes | 877 | -- Represent unsupported packets as their tag and literal bytes |
872 | parse_signature_subpacket tag = | 878 | parse_signature_subpacket tag = |
873 | fmap (UnsupportedSignatureSubpacket tag) getRemainingByteString | 879 | fmap (UnsupportedSignatureSubpacket tag) getRemainingByteString |