summaryrefslogtreecommitdiffhomepage
path: root/Gpg/Wot.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-05-20 17:09:28 -0400
committerJoey Hess <joeyh@joeyh.name>2017-05-20 17:21:08 -0400
commit73a310ce49c91f0884d05a8d2cd8c96c3c5447d3 (patch)
tree1d7489b13e5ae950a849508857111966e538625e /Gpg/Wot.hs
parent34b0151e125a6698f57ea476ccfa922c6275edf1 (diff)
downloaddebug-me-73a310ce49c91f0884d05a8d2cd8c96c3c5447d3.tar.gz
developer keyring verification
* gpg keyrings in /usr/share/debug-me/ will be checked to see if a connecting person is a known developer of software installed on the system, and so implicitly trusted already. Software packages/projects can install keyrings to that location. (Thanks to Sean Whitton for the idea.) * make install will install /usr/share/debug-me/debug-me_developer.gpg, which contains the key of Joey Hess. (stack and cabal installs don't include this file because they typically don't install system-wide) * debug-me.cabal: Added dependency on time. This commit was sponsored by Francois Marier on Patreon.
Diffstat (limited to 'Gpg/Wot.hs')
-rw-r--r--Gpg/Wot.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Gpg/Wot.hs b/Gpg/Wot.hs
index b29ccc7..2a6d541 100644
--- a/Gpg/Wot.hs
+++ b/Gpg/Wot.hs
@@ -107,7 +107,7 @@ describeWot (Just ws) (StrongSetAnalysis ss)
, theirname ++ " is probably a real person."
]
where
- theirname = stripEmail (uid (key ws))
+ theirname = wotStatName ws
sigs = cross_sigs ws ++ other_sigs ws
bestconnectedsigs = sortOn rank sigs
describeWot Nothing _ =
@@ -115,5 +115,8 @@ describeWot Nothing _ =
, "Their identity cannot be verified!"
]
+wotStatName :: WotStats -> String
+wotStatName ws = stripEmail (uid (key ws))
+
stripEmail :: String -> String
stripEmail = unwords . takeWhile (not . ("<" `isPrefixOf`)) . words