summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2013-12-06 05:18:24 -0500
committerjoe <joe@jerkface.net>2013-12-06 05:18:24 -0500
commit57696314ccdb99806395469cfdbdeea6d82f75f0 (patch)
tree7cb74d5a029cf8538139dcc791261fef24b9f66c
parent5cb9d21f7f5d4657ed5fc3181bdf8a0b6425917f (diff)
Show ^ signed for third-party binding signatures.
-rw-r--r--kiki.hs26
1 files 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
466 matchgrip ((code,(top,sub), kind, hashed,claimants):_) | any (flip fpmatch top . Just) grips = True 466 matchgrip ((code,(top,sub), kind, hashed,claimants):_) | any (flip fpmatch top . Just) grips = True
467 matchgrip _ = False 467 matchgrip _ = False
468 gs = filter matchgrip $ groupBy sameMaster (sortBy (comparing code) as) 468 gs = filter matchgrip $ groupBy sameMaster (sortBy (comparing code) as)
469 showsigs claimants = map (\k -> " " ++ "^ signed: " ++ fingerprint k) claimants
469 subs <- gs 470 subs <- gs
470 let (code,(top,sub), kind, hashed,claimants):_ = subs 471 let (code,(top,sub), kind, hashed,claimants):_ = subs
471 subkeys = do 472 subkeys = do
@@ -477,17 +478,16 @@ listKeysFiltered grips pkts = do
477 3 -> " <-> " 478 3 -> " <-> "
478 formkind = take kindcol $ defaultkind kind hashed ++ repeat ' ' 479 formkind = take kindcol $ defaultkind kind hashed ++ repeat ' '
479 torhash = maybe "" id $ derToBase32 <$> derRSA sub 480 torhash = maybe "" id $ derToBase32 <$> derRSA sub
480 concat [ " " 481 unlines $
481 -- , grip top 482 concat [ " "
482 , (if not (null claimants) 483 -- , grip top
483 then trace ("claimants: "++show (map fingerprint claimants)) 484 , ar
484 else id) ar 485 , formkind
485 , formkind 486 , " "
486 , " " 487 , fingerprint sub
487 , fingerprint sub 488 -- , " " ++ torhash
488 -- , " " ++ torhash 489 ] -- ++ ppShow hashed
489 , "\n" ] 490 : showsigs claimants
490 -- ++ ppShow hashed
491 torkeys = do 491 torkeys = do
492 (code,(top,sub), kind, hashed,claimants) <- subs 492 (code,(top,sub), kind, hashed,claimants) <- subs
493 guard ("tor" `elem` kind) 493 guard ("tor" `elem` kind)
@@ -521,7 +521,7 @@ listKeysFiltered grips pkts = do
521 guard (len >= 16) 521 guard (len >= 16)
522 listToMaybe $ filter match torkeys 522 listToMaybe $ filter match torkeys
523 unlines $ [ " " ++ ar ++ "@" ++ " " ++ uid_full parsed ] 523 unlines $ [ " " ++ ar ++ "@" ++ " " ++ uid_full parsed ]
524 ++ map (\k -> " " ++ "^ signed: " ++ fingerprint k) secondary 524 ++ showsigs secondary
525 (_,sigs) = unzip certs 525 (_,sigs) = unzip certs
526 "master-key " ++ fingerprint top ++ "\n" ++ uid ++" ...\n" ++ subkeys ++ "\n" 526 "master-key " ++ fingerprint top ++ "\n" ++ uid ++" ...\n" ++ subkeys ++ "\n"
527 527
@@ -1259,7 +1259,7 @@ parseSpec grip spec = (topspec,subspec)
1259 "t" -> Just sub 1259 "t" -> Just sub
1260 "fp" | top=="" -> Nothing 1260 "fp" | top=="" -> Nothing
1261 "" | top=="" && is40digitHex sub -> Nothing 1261 "" | top=="" && is40digitHex sub -> Nothing
1262 "" -> Just sub 1262 "" -> listToMaybe sub >> Just sub
1263 1263
1264splitAtMinBy comp xs = minimumBy comp' xxs 1264splitAtMinBy comp xs = minimumBy comp' xxs
1265 where 1265 where