summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2020-05-10 12:36:22 -0400
committerJoe Crayne <joe@jerkface.net>2020-05-19 11:58:22 -0400
commitde7e70d424da07993fbf3efcccbdb8b1d8bff82d (patch)
tree1a6182312fde8a0239f46a5ca68b6062fe5c877e
parenta0994da3aa361e1fff4d5e523e3b33341b0d245f (diff)
Added HasCallStack to keyParam error call.
-rw-r--r--Data/OpenPGP/Util/Base.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Data/OpenPGP/Util/Base.hs b/Data/OpenPGP/Util/Base.hs
index 0c888ca..b43427c 100644
--- a/Data/OpenPGP/Util/Base.hs
+++ b/Data/OpenPGP/Util/Base.hs
@@ -30,6 +30,7 @@ import qualified Crypto.Types.PubKey.ECDSA as Vincent.ECDSA
30#endif 30#endif
31import qualified Crypto.PubKey.RSA as Vincent.RSA 31import qualified Crypto.PubKey.RSA as Vincent.RSA
32import qualified Crypto.Random as Vincent 32import qualified Crypto.Random as Vincent
33import GHC.Stack
33 34
34import Data.OpenPGP.Util.Fingerprint (fingerprint) 35import Data.OpenPGP.Util.Fingerprint (fingerprint)
35 36
@@ -85,7 +86,7 @@ find_key :: OpenPGP.Message -> String -> Maybe OpenPGP.Packet
85find_key = OpenPGP.find_key (show . fingerprint) 86find_key = OpenPGP.find_key (show . fingerprint)
86 87
87 88
88keyParam :: Char -> OpenPGP.Packet -> Integer 89keyParam :: HasCallStack => Char -> OpenPGP.Packet -> Integer
89keyParam c k = fromJustMPI $ lookup c (OpenPGP.key k) 90keyParam c k = fromJustMPI $ lookup c (OpenPGP.key k)
90 where 91 where
91 fromJustMPI :: Maybe OpenPGP.MPI -> Integer 92 fromJustMPI :: Maybe OpenPGP.MPI -> Integer