diff options
Diffstat (limited to 'Data')
-rw-r--r-- | Data/OpenPGP.hs | 11 | ||||
-rw-r--r-- | Data/OpenPGP/Util/DecryptSecretKey.hs | 2 | ||||
-rw-r--r-- | Data/OpenPGP/Util/Fingerprint.hs | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs index dc6fb78..6140ddf 100644 --- a/Data/OpenPGP.hs +++ b/Data/OpenPGP.hs | |||
@@ -75,7 +75,8 @@ module Data.OpenPGP ( | |||
75 | decode_public_key_material, | 75 | decode_public_key_material, |
76 | getEllipticCurvePublicKey, | 76 | getEllipticCurvePublicKey, |
77 | encodeOID, | 77 | encodeOID, |
78 | hashLen | 78 | hashLen, |
79 | defaultFeatures | ||
79 | ) where | 80 | ) where |
80 | 81 | ||
81 | import Control.Applicative | 82 | import Control.Applicative |
@@ -1326,6 +1327,14 @@ data SignatureSubpacket = | |||
1326 | UnsupportedSignatureSubpacket Word8 B.ByteString | 1327 | UnsupportedSignatureSubpacket Word8 B.ByteString |
1327 | deriving (Show, Read, Eq) | 1328 | deriving (Show, Read, Eq) |
1328 | 1329 | ||
1330 | defaultFeatures :: SignatureSubpacket | ||
1331 | defaultFeatures = | ||
1332 | FeaturesPacket | ||
1333 | { supports_mdc = True | ||
1334 | , supports_aead = False | ||
1335 | , supports_v5 = True | ||
1336 | } | ||
1337 | |||
1329 | instance BINARY_CLASS SignatureSubpacket where | 1338 | instance BINARY_CLASS SignatureSubpacket where |
1330 | put p = do | 1339 | put p = do |
1331 | -- Use 5-octet-length + 1 for tag as the first packet body octet | 1340 | -- Use 5-octet-length + 1 for tag as the first packet body octet |
diff --git a/Data/OpenPGP/Util/DecryptSecretKey.hs b/Data/OpenPGP/Util/DecryptSecretKey.hs index 9f9e42a..753cef3 100644 --- a/Data/OpenPGP/Util/DecryptSecretKey.hs +++ b/Data/OpenPGP/Util/DecryptSecretKey.hs | |||
@@ -76,7 +76,7 @@ decryptSecretKey pass k@(OpenPGP.SecretKeyPacket { | |||
76 | OpenPGP.version = 4, OpenPGP.key_algorithm = kalgo, | 76 | OpenPGP.version = 4, OpenPGP.key_algorithm = kalgo, |
77 | OpenPGP.s2k = s2k, OpenPGP.symmetric_algorithm = salgo, | 77 | OpenPGP.s2k = s2k, OpenPGP.symmetric_algorithm = salgo, |
78 | OpenPGP.key = existing, OpenPGP.encrypted_data = encd | 78 | OpenPGP.key = existing, OpenPGP.encrypted_data = encd |
79 | }) | chkF material == LZ.toStrict chk = | 79 | }) | chkF material == LZ.toStrict chk = -- TODO: v5 |
80 | fmap (\m -> k { | 80 | fmap (\m -> k { |
81 | OpenPGP.s2k_useage = 0, | 81 | OpenPGP.s2k_useage = 0, |
82 | OpenPGP.symmetric_algorithm = OpenPGP.Unencrypted, | 82 | OpenPGP.symmetric_algorithm = OpenPGP.Unencrypted, |
diff --git a/Data/OpenPGP/Util/Fingerprint.hs b/Data/OpenPGP/Util/Fingerprint.hs index 955748d..422beac 100644 --- a/Data/OpenPGP/Util/Fingerprint.hs +++ b/Data/OpenPGP/Util/Fingerprint.hs | |||
@@ -23,6 +23,7 @@ oo :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c | |||
23 | oo = (.) . (.) | 23 | oo = (.) . (.) |
24 | 24 | ||
25 | newtype Fingerprint = Fingerprint BS.ByteString | 25 | newtype Fingerprint = Fingerprint BS.ByteString |
26 | deriving (Eq,Ord) | ||
26 | 27 | ||
27 | instance Show Fingerprint where | 28 | instance Show Fingerprint where |
28 | show fp = hex fp | 29 | show fp = hex fp |