summaryrefslogtreecommitdiffhomepage
path: root/Hash.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-26 17:31:30 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-26 18:13:40 -0400
commit3c7d3b3a2088cfe3698c3b055822c2b9fa67468a (patch)
treeea059c1d13981e12d461bb7485406aaea0d2ba1c /Hash.hs
parent8f2d5a67911ae22ff5bf0a191aa63cbb61da32ac (diff)
downloaddebug-me-3c7d3b3a2088cfe3698c3b055822c2b9fa67468a.tar.gz
gpg sign developer session key
And part of what we need to have users verify them. This commit was sponsored by andrea rota.
Diffstat (limited to 'Hash.hs')
-rw-r--r--Hash.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Hash.hs b/Hash.hs
index c9b45e0..3bfb5a2 100644
--- a/Hash.hs
+++ b/Hash.hs
@@ -56,12 +56,15 @@ instance Hashable Signature where
hash (OtherSignature s) = hash $ Tagged "OtherSignature" s
instance Hashable PublicKey where
- hash (PublicKey v gpgsig) = hash $ Tagged "PublicKey"
- [hash v, hash gpgsig]
+ hash (PublicKey v) = hash $ Tagged "PublicKey" v
instance Hashable GpgSig where
hash (GpgSig v) = hash $ Tagged "GpgSig" v
+instance Hashable a => Hashable (PerhapsSigned a) where
+ hash (GpgSigned a sig) = hash $ Tagged "GpgSigned" [hash a, hash sig]
+ hash (UnSigned a) = hash $ Tagged "UnSigned" a
+
instance Hashable ElapsedTime where
hash (ElapsedTime n) = hash $ Tagged "ElapsedTime" $ C8.pack $ show n