diff options
author | joe <joe@jerkface.net> | 2016-08-29 22:24:08 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2016-08-29 22:24:08 -0400 |
commit | 78c2c3753e69818aa7fd5d3a0354fea5d0fc452b (patch) | |
tree | 9f1b155c07db63d22f01e04198d00b89a109f6b9 /kiki.hs | |
parent | 63af3d0f3d149b110e172223c18afacd77a172f8 (diff) |
cokiki build fix & show --packets option.
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 | ||
309 | show_packets puborsec db = do | ||
310 | let Message packets = flattenKeys (case puborsec of { "sec":_ -> False; _ -> True }) db | ||
311 | forM_ packets $ putStrLn . showPacket | ||
312 | |||
309 | show_whose_key input_key db = | 313 | show_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) |