From 352b340868f52d4749180c1ceb63e599170abada Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Thu, 11 Jul 2019 23:43:16 -0400 Subject: Promote KeyDB to a type. --- lib/Kiki.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Kiki.hs') 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 names :: KeyRingRuntime -> Maybe Hostnames names rt = do wk <- rtWorkingKey rt -- XXX unnecessary signature check - return $ getHostnames (rtKeyDB rt Map.! keykey wk) + return $ getHostnames (byKeyKey (rtKeyDB rt) Map.! keykey wk) getssh :: (Char8.ByteString, SockAddr, KeyData) -> Char8.ByteString getssh (contactname,_addr,kd) = do @@ -545,7 +545,7 @@ writePublicKeyFiles rt fw grip oname wkaddr = do either warn (write fw "ssh_host_rsa_key.pub") $ show_ssh' "ssh-server" grip (rtKeyDB rt) either warn (write fw $ ipsecCertPath oname) $ show_pem' "ipsec" grip (rtKeyDB rt) pemFromPacket - let onionkeys = mapMaybe namedContact $ Map.elems $ rtKeyDB rt + let onionkeys = mapMaybe namedContact $ Map.elems $ byKeyKey $ rtKeyDB rt cs = filter (\(_,_,kd) -> notme kd) onionkeys kk = keykey (fromJust $ rtWorkingKey rt) notme kd = keykey (keyPacket kd) /= kk -- cgit v1.2.3