From 57696314ccdb99806395469cfdbdeea6d82f75f0 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 6 Dec 2013 05:18:24 -0500 Subject: Show ^ signed for third-party binding signatures. --- kiki.hs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/kiki.hs b/kiki.hs index 65a793c..171319a 100644 --- a/kiki.hs +++ b/kiki.hs @@ -466,6 +466,7 @@ listKeysFiltered grips pkts = do matchgrip ((code,(top,sub), kind, hashed,claimants):_) | any (flip fpmatch top . Just) grips = True matchgrip _ = False gs = filter matchgrip $ groupBy sameMaster (sortBy (comparing code) as) + showsigs claimants = map (\k -> " " ++ "^ signed: " ++ fingerprint k) claimants subs <- gs let (code,(top,sub), kind, hashed,claimants):_ = subs subkeys = do @@ -477,17 +478,16 @@ listKeysFiltered grips pkts = do 3 -> " <-> " formkind = take kindcol $ defaultkind kind hashed ++ repeat ' ' torhash = maybe "" id $ derToBase32 <$> derRSA sub - concat [ " " - -- , grip top - , (if not (null claimants) - then trace ("claimants: "++show (map fingerprint claimants)) - else id) ar - , formkind - , " " - , fingerprint sub - -- , " " ++ torhash - , "\n" ] - -- ++ ppShow hashed + unlines $ + concat [ " " + -- , grip top + , ar + , formkind + , " " + , fingerprint sub + -- , " " ++ torhash + ] -- ++ ppShow hashed + : showsigs claimants torkeys = do (code,(top,sub), kind, hashed,claimants) <- subs guard ("tor" `elem` kind) @@ -521,7 +521,7 @@ listKeysFiltered grips pkts = do guard (len >= 16) listToMaybe $ filter match torkeys unlines $ [ " " ++ ar ++ "@" ++ " " ++ uid_full parsed ] - ++ map (\k -> " " ++ "^ signed: " ++ fingerprint k) secondary + ++ showsigs secondary (_,sigs) = unzip certs "master-key " ++ fingerprint top ++ "\n" ++ uid ++" ...\n" ++ subkeys ++ "\n" @@ -1259,7 +1259,7 @@ parseSpec grip spec = (topspec,subspec) "t" -> Just sub "fp" | top=="" -> Nothing "" | top=="" && is40digitHex sub -> Nothing - "" -> Just sub + "" -> listToMaybe sub >> Just sub splitAtMinBy comp xs = minimumBy comp' xxs where -- cgit v1.2.3