summaryrefslogtreecommitdiff
path: root/lib/Kiki.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-07-11 23:43:16 -0400
committerJoe Crayne <joe@jerkface.net>2019-07-11 23:43:16 -0400
commit352b340868f52d4749180c1ceb63e599170abada (patch)
tree34127970fff880afee59e55254433faf811e02ed /lib/Kiki.hs
parent365bdcd8d9f4a08aaae35fc27722d268f4af9041 (diff)
Promote KeyDB to a type.
Diffstat (limited to 'lib/Kiki.hs')
-rw-r--r--lib/Kiki.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Kiki.hs b/lib/Kiki.hs
index 20ab1f2..4fb19ff 100644
--- a/lib/Kiki.hs
+++ b/lib/Kiki.hs
@@ -449,7 +449,7 @@ generateHostsFile fw rt = do
449names :: KeyRingRuntime -> Maybe Hostnames 449names :: KeyRingRuntime -> Maybe Hostnames
450names rt = do wk <- rtWorkingKey rt 450names rt = do wk <- rtWorkingKey rt
451 -- XXX unnecessary signature check 451 -- XXX unnecessary signature check
452 return $ getHostnames (rtKeyDB rt Map.! keykey wk) 452 return $ getHostnames (byKeyKey (rtKeyDB rt) Map.! keykey wk)
453 453
454getssh :: (Char8.ByteString, SockAddr, KeyData) -> Char8.ByteString 454getssh :: (Char8.ByteString, SockAddr, KeyData) -> Char8.ByteString
455getssh (contactname,_addr,kd) = do 455getssh (contactname,_addr,kd) = do
@@ -545,7 +545,7 @@ writePublicKeyFiles rt fw grip oname wkaddr = do
545 either warn (write fw "ssh_host_rsa_key.pub") $ show_ssh' "ssh-server" grip (rtKeyDB rt) 545 either warn (write fw "ssh_host_rsa_key.pub") $ show_ssh' "ssh-server" grip (rtKeyDB rt)
546 either warn (write fw $ ipsecCertPath oname) $ show_pem' "ipsec" grip (rtKeyDB rt) pemFromPacket 546 either warn (write fw $ ipsecCertPath oname) $ show_pem' "ipsec" grip (rtKeyDB rt) pemFromPacket
547 547
548 let onionkeys = mapMaybe namedContact $ Map.elems $ rtKeyDB rt 548 let onionkeys = mapMaybe namedContact $ Map.elems $ byKeyKey $ rtKeyDB rt
549 cs = filter (\(_,_,kd) -> notme kd) onionkeys 549 cs = filter (\(_,_,kd) -> notme kd) onionkeys
550 kk = keykey (fromJust $ rtWorkingKey rt) 550 kk = keykey (fromJust $ rtWorkingKey rt)
551 notme kd = keykey (keyPacket kd) /= kk 551 notme kd = keykey (keyPacket kd) /= kk