summaryrefslogtreecommitdiff
path: root/kiki.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2016-08-29 22:24:08 -0400
committerjoe <joe@jerkface.net>2016-08-29 22:24:08 -0400
commit78c2c3753e69818aa7fd5d3a0354fea5d0fc452b (patch)
tree9f1b155c07db63d22f01e04198d00b89a109f6b9 /kiki.hs
parent63af3d0f3d149b110e172223c18afacd77a172f8 (diff)
cokiki build fix & show --packets option.
Diffstat (limited to 'kiki.hs')
-rw-r--r--kiki.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/kiki.hs b/kiki.hs
index f42ee22..d3e505a 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -306,6 +306,10 @@ show_all db = do
306 let Message packets = flattenKeys True db 306 let Message packets = flattenKeys True db
307 putStrLn $ listKeys packets 307 putStrLn $ listKeys packets
308 308
309show_packets puborsec db = do
310 let Message packets = flattenKeys (case puborsec of { "sec":_ -> False; _ -> True }) db
311 forM_ packets $ putStrLn . showPacket
312
309show_whose_key input_key db = 313show_whose_key input_key db =
310 flip (maybe $ return ()) input_key $ \input_key -> do 314 flip (maybe $ return ()) input_key $ \input_key -> do
311 let ks = whoseKey input_key db 315 let ks = whoseKey input_key db
@@ -1220,6 +1224,7 @@ kiki "show" args = do
1220 , ("--dump",0) --("--show-all",0) 1224 , ("--dump",0) --("--show-all",0)
1221 , ("--all",0) --("--show-all",0) 1225 , ("--all",0) --("--show-all",0)
1222 , ("--whose-key",0) 1226 , ("--whose-key",0)
1227 , ("--packets",1)
1223 , ("--key",1) 1228 , ("--key",1)
1224 , ("--pem",1) 1229 , ("--pem",1)
1225 , ("--dns",1) 1230 , ("--dns",1)
@@ -1271,6 +1276,7 @@ kiki "show" args = do
1271 let shspec = Map.fromList [("--working", const $ show_wk (rtSecring rt) grip) 1276 let shspec = Map.fromList [("--working", const $ show_wk (rtSecring rt) grip)
1272 ,("--all",const show_all) 1277 ,("--all",const show_all)
1273 ,("--whose-key", const $ show_whose_key input_key) 1278 ,("--whose-key", const $ show_whose_key input_key)
1279 ,("--packets", show_packets)
1274 ,("--key",\[x] -> show_id x $ fromMaybe "" grip) 1280 ,("--key",\[x] -> show_id x $ fromMaybe "" grip)
1275 ,("--pem",\[x] -> show_pem x $ fromMaybe "" grip) 1281 ,("--pem",\[x] -> show_pem x $ fromMaybe "" grip)
1276 ,("--dns",\[x] -> show_dns x $ fromMaybe "" grip) 1282 ,("--dns",\[x] -> show_dns x $ fromMaybe "" grip)