diff options
Diffstat (limited to 'Data/OpenPGP/Util/Sign.hs')
-rw-r--r-- | Data/OpenPGP/Util/Sign.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Data/OpenPGP/Util/Sign.hs b/Data/OpenPGP/Util/Sign.hs index d96c3a7..085d545 100644 --- a/Data/OpenPGP/Util/Sign.hs +++ b/Data/OpenPGP/Util/Sign.hs | |||
@@ -17,6 +17,7 @@ import Data.Time.Clock.POSIX | |||
17 | #endif | 17 | #endif |
18 | import Control.Exception as Exception (IOException(..),catch) | 18 | import Control.Exception as Exception (IOException(..),catch) |
19 | 19 | ||
20 | import Data.OpenPGP.Util.Ed25519 | ||
20 | import Data.OpenPGP.Util.Fingerprint (fingerprint) | 21 | import Data.OpenPGP.Util.Fingerprint (fingerprint) |
21 | import Data.OpenPGP.Util.Gen | 22 | import Data.OpenPGP.Util.Gen |
22 | 23 | ||
@@ -69,6 +70,7 @@ unsafeSign keys over hsh keyid timestamp g = (over {OpenPGP.signatures_over = [s | |||
69 | (final, g') = case OpenPGP.key_algorithm sig of | 70 | (final, g') = case OpenPGP.key_algorithm sig of |
70 | OpenPGP.DSA -> ([dsaR, dsaS], dsaG) | 71 | OpenPGP.DSA -> ([dsaR, dsaS], dsaG) |
71 | OpenPGP.ECDSA -> ([ecdsaR,ecdsaS],ecdsaG) | 72 | OpenPGP.ECDSA -> ([ecdsaR,ecdsaS],ecdsaG) |
73 | OpenPGP.Ed25519 -> (ed25519Sign k hsh dta, g) | ||
72 | kalgo | kalgo `elem` [OpenPGP.RSA,OpenPGP.RSA_S] -> ([toNum rsaFinal], g) | 74 | kalgo | kalgo `elem` [OpenPGP.RSA,OpenPGP.RSA_S] -> ([toNum rsaFinal], g) |
73 | | otherwise -> | 75 | | otherwise -> |
74 | error ("Unsupported key algorithm " ++ show kalgo ++ " in sign") | 76 | error ("Unsupported key algorithm " ++ show kalgo ++ " in sign") |