diff options
author | Joe Crayne <joe@jerkface.net> | 2019-07-11 23:43:16 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-07-11 23:43:16 -0400 |
commit | 352b340868f52d4749180c1ceb63e599170abada (patch) | |
tree | 34127970fff880afee59e55254433faf811e02ed /lib/Kiki.hs | |
parent | 365bdcd8d9f4a08aaae35fc27722d268f4af9041 (diff) |
Promote KeyDB to a type.
Diffstat (limited to 'lib/Kiki.hs')
-rw-r--r-- | lib/Kiki.hs | 4 |
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 | |||
449 | names :: KeyRingRuntime -> Maybe Hostnames | 449 | names :: KeyRingRuntime -> Maybe Hostnames |
450 | names rt = do wk <- rtWorkingKey rt | 450 | names 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 | ||
454 | getssh :: (Char8.ByteString, SockAddr, KeyData) -> Char8.ByteString | 454 | getssh :: (Char8.ByteString, SockAddr, KeyData) -> Char8.ByteString |
455 | getssh (contactname,_addr,kd) = do | 455 | getssh (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 |