diff options
author | Joe Crayne <joe@jerkface.net> | 2020-05-06 06:37:26 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-05-06 09:33:33 -0400 |
commit | 99ee915c0fdbf5bc718dbd59e9f5bbe9f5f7690c (patch) | |
tree | d376f6405deeb640aed44ef5995b08fc9a3099a4 /Data/OpenPGP.hs | |
parent | 02680b1ed3b37c0cc16e04e51e613d53ff9dbab8 (diff) |
Implemented v5 fingerprints (draft-ietf-openpgp-rfc4880bis-09).
Diffstat (limited to 'Data/OpenPGP.hs')
-rw-r--r-- | Data/OpenPGP.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs index 17a6927..3064dc5 100644 --- a/Data/OpenPGP.hs +++ b/Data/OpenPGP.hs | |||
@@ -845,6 +845,16 @@ parse_packet tag = fmap (UnsupportedPacket tag) getRemainingByteString | |||
845 | 845 | ||
846 | -- | Helper method for fingerprints and such | 846 | -- | Helper method for fingerprints and such |
847 | fingerprint_material :: Packet -> [B.ByteString] | 847 | fingerprint_material :: Packet -> [B.ByteString] |
848 | fingerprint_material p | version p == 5 = | ||
849 | [ | ||
850 | B.singleton 0x9A, | ||
851 | encode (10 + fromIntegral (B.length material) :: Word32), | ||
852 | B.singleton 5, encode (timestamp p), encode (key_algorithm p), | ||
853 | encode (fromIntegral (B.length material) :: Word32), | ||
854 | material | ||
855 | ] | ||
856 | where | ||
857 | material = B.concat $ encode_public_key_material p | ||
848 | fingerprint_material p | version p == 4 = | 858 | fingerprint_material p | version p == 4 = |
849 | [ | 859 | [ |
850 | B.singleton 0x99, | 860 | B.singleton 0x99, |