summaryrefslogtreecommitdiff
path: root/Data/OpenPGP/Util/Sign.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Data/OpenPGP/Util/Sign.hs')
-rw-r--r--Data/OpenPGP/Util/Sign.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Data/OpenPGP/Util/Sign.hs b/Data/OpenPGP/Util/Sign.hs
index 4a6eb4f..466f05c 100644
--- a/Data/OpenPGP/Util/Sign.hs
+++ b/Data/OpenPGP/Util/Sign.hs
@@ -142,7 +142,7 @@ stampit timestamp sig = sig { OpenPGP.hashed_subpackets = hashed' }
142-- | Make a signature 142-- | Make a signature
143-- 143--
144-- In order to set more options on a signature, pass in a signature packet. 144-- In order to set more options on a signature, pass in a signature packet.
145pgpSign :: 145pgpSign ::
146 OpenPGP.Message -- ^ SecretKeys, one of which will be used 146 OpenPGP.Message -- ^ SecretKeys, one of which will be used
147 -> OpenPGP.SignatureOver -- ^ Data to sign, and optional signature packet 147 -> OpenPGP.SignatureOver -- ^ Data to sign, and optional signature packet
148 -> OpenPGP.HashAlgorithm -- ^ HashAlgorithm to use in signature 148 -> OpenPGP.HashAlgorithm -- ^ HashAlgorithm to use in signature
@@ -153,7 +153,7 @@ pgpSign seckeys dta hash_algo keyid =
153 timestamp <- now 153 timestamp <- now
154 -- g <- Thomas.newGenIO :: IO Thomas.SystemRandom 154 -- g <- Thomas.newGenIO :: IO Thomas.SystemRandom
155 g <- fmap Vincent.cprgCreate $ Vincent.createEntropyPool 155 g <- fmap Vincent.cprgCreate $ Vincent.createEntropyPool
156 let _ = g :: Vincent.SystemRNG 156 let _ = g :: Vincent.SystemRNG
157 let sigs = map (stampit timestamp) $ OpenPGP.signatures_over dta 157 let sigs = map (stampit timestamp) $ OpenPGP.signatures_over dta
158 dta' = dta { OpenPGP.signatures_over = sigs } 158 dta' = dta { OpenPGP.signatures_over = sigs }
159 let (r,g') = unsafeSign seckeys dta' hash_algo keyid timestamp g 159 let (r,g') = unsafeSign seckeys dta' hash_algo keyid timestamp g