summaryrefslogtreecommitdiff
path: root/kiki.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2016-08-25 12:41:59 -0400
committerjoe <joe@jerkface.net>2016-08-25 12:41:59 -0400
commit26d215428efbe6447ae319ae3bbfa7d39209688e (patch)
treed693b66a860eb87eb2c1dec6e4dbc1975c91583e /kiki.hs
parentaea085761eeaeb0debc1373aeb7edee25c3120a5 (diff)
Show cipher for password-protected keys.
Diffstat (limited to 'kiki.hs')
-rw-r--r--kiki.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/kiki.hs b/kiki.hs
index eabfbf3..854bf23 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -194,6 +194,7 @@ listKeysFiltered grips pkts = do
194 , formkind 194 , formkind
195 , " " 195 , " "
196 , fingerprint sub 196 , fingerprint sub
197 , kcipher sub
197 -- , " " ++ (torhash sub) 198 -- , " " ++ (torhash sub)
198 -- , " " ++ (concatMap (printf "%02X") $ S.unpack (ecc_curve sub)) 199 -- , " " ++ (concatMap (printf "%02X") $ S.unpack (ecc_curve sub))
199 ] -- ++ ppShow hashed 200 ] -- ++ ppShow hashed
@@ -202,6 +203,8 @@ listKeysFiltered grips pkts = do
202 -- then (" " ++ "BTC " ++ bitcoinAddress sub) : showsigs claimants 203 -- then (" " ++ "BTC " ++ bitcoinAddress sub) : showsigs claimants
203 then (" " ++ "¢ "++kind'++":" ++ bitcoinAddress netid sub) : showsigs claimants 204 then (" " ++ "¢ "++kind'++":" ++ bitcoinAddress netid sub) : showsigs claimants
204 else showsigs claimants 205 else showsigs claimants
206 kcipher k = if isSecretKey k then " " ++ ciphername (symmetric_algorithm k)
207 else ""
205 torkeys = do 208 torkeys = do
206 (code,(top,sub), kind, hashed,claimants) <- subs 209 (code,(top,sub), kind, hashed,claimants) <- subs
207 guard ("tor" `elem` kind) 210 guard ("tor" `elem` kind)
@@ -236,7 +239,7 @@ listKeysFiltered grips pkts = do
236 listToMaybe $ filter match torkeys 239 listToMaybe $ filter match torkeys
237 unlines $ (" " ++ ar ++ "@" ++ " " ++ uid_full parsed) : showsigs secondary 240 unlines $ (" " ++ ar ++ "@" ++ " " ++ uid_full parsed) : showsigs secondary
238 -- (_,sigs) = unzip certs 241 -- (_,sigs) = unzip certs
239 "master-key " ++ fingerprint top ++ "\n" ++ uid ++" ...\n" ++ subkeys ++ "\n" 242 "master-key " ++ fingerprint top ++ kcipher top ++ "\n" ++ uid ++" ...\n" ++ subkeys ++ "\n"
240 243
241 244
242{- 245{-