summaryrefslogtreecommitdiff
path: root/Data
diff options
context:
space:
mode:
authorStephen Paul Weber <singpolyma@singpolyma.net>2012-04-27 15:06:12 -0500
committerStephen Paul Weber <singpolyma@singpolyma.net>2012-04-27 15:06:12 -0500
commitd9b4face488cb3eb1a914f37b24751bb5dd9aeac (patch)
tree3fc4e40a87fbd21dcf4d104075dec89a5c0da366 /Data
parentbb537f6275d9c83ed11ab477eefdb33ccb38428f (diff)
KeyExpirationTimePacket
Diffstat (limited to 'Data')
-rw-r--r--Data/OpenPGP.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs
index b9a4836..acf5fb6 100644
--- a/Data/OpenPGP.hs
+++ b/Data/OpenPGP.hs
@@ -660,6 +660,7 @@ data SignatureSubpacket =
660 TrustSignaturePacket {depth::Word8, trust::Word8} | 660 TrustSignaturePacket {depth::Word8, trust::Word8} |
661 RegularExpressionPacket String | 661 RegularExpressionPacket String |
662 RevocablePacket Bool | 662 RevocablePacket Bool |
663 KeyExpirationTimePacket Word32 | -- seconds after key CreationTime
663 IssuerPacket String | 664 IssuerPacket String |
664 UnsupportedSignatureSubpacket Word8 B.ByteString 665 UnsupportedSignatureSubpacket Word8 B.ByteString
665 deriving (Show, Read, Eq) 666 deriving (Show, Read, Eq)
@@ -705,6 +706,8 @@ put_signature_subpacket (RegularExpressionPacket regex) =
705 (B.concat [B.fromString regex, B.singleton 0], 6) 706 (B.concat [B.fromString regex, B.singleton 0], 6)
706put_signature_subpacket (RevocablePacket exportable) = 707put_signature_subpacket (RevocablePacket exportable) =
707 (encode $ enum_to_word8 exportable, 7) 708 (encode $ enum_to_word8 exportable, 7)
709put_signature_subpacket (KeyExpirationTimePacket time) =
710 (encode time, 9)
708put_signature_subpacket (IssuerPacket keyid) = 711put_signature_subpacket (IssuerPacket keyid) =
709 (encode (fst $ head $ readHex keyid :: Word64), 16) 712 (encode (fst $ head $ readHex keyid :: Word64), 16)
710put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) = 713put_signature_subpacket (UnsupportedSignatureSubpacket tag bytes) =
@@ -726,6 +729,8 @@ parse_signature_subpacket 6 = fmap
726-- RevocablePacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.12 729-- RevocablePacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.12
727parse_signature_subpacket 7 = 730parse_signature_subpacket 7 =
728 fmap (RevocablePacket . enum_from_word8) get 731 fmap (RevocablePacket . enum_from_word8) get
732-- KeyExpirationTimePacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.6
733parse_signature_subpacket 9 = fmap KeyExpirationTimePacket get
729-- IssuerPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.5 734-- IssuerPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.5
730parse_signature_subpacket 16 = do 735parse_signature_subpacket 16 = do
731 keyid <- get :: Get Word64 736 keyid <- get :: Get Word64