diff options
Diffstat (limited to 'lib/Kiki.hs')
-rw-r--r-- | lib/Kiki.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Kiki.hs b/lib/Kiki.hs index ca6e80f..8ceda99 100644 --- a/lib/Kiki.hs +++ b/lib/Kiki.hs | |||
@@ -431,7 +431,7 @@ generateHostsFile mkpath rt = do | |||
431 | KikiResult _ report <- runKeyRing op | 431 | KikiResult _ report <- runKeyRing op |
432 | outputReport report | 432 | outputReport report |
433 | 433 | ||
434 | names :: KeyRingRuntime -> Maybe (SockAddr, ([Char8.ByteString], [Char8.ByteString])) | 434 | names :: KeyRingRuntime -> Maybe Hostnames |
435 | names rt = do wk <- rtWorkingKey rt | 435 | names rt = do wk <- rtWorkingKey rt |
436 | -- XXX unnecessary signature check | 436 | -- XXX unnecessary signature check |
437 | return $ getHostnames (rtKeyDB rt Map.! keykey wk) | 437 | return $ getHostnames (rtKeyDB rt Map.! keykey wk) |
@@ -478,7 +478,7 @@ refreshCache rt rootdir = do | |||
478 | (mkpath, commit) <- getMkPathAndCommit (fromMaybe "" rootdir ++ "/var/cache/kiki/config") | 478 | (mkpath, commit) <- getMkPathAndCommit (fromMaybe "" rootdir ++ "/var/cache/kiki/config") |
479 | generateHostsFile mkpath rt | 479 | generateHostsFile mkpath rt |
480 | fromMaybe (error "No working key.") $ do | 480 | fromMaybe (error "No working key.") $ do |
481 | (wkaddr,(onames,_)) <- names rt | 481 | Hostnames wkaddr onames _ _ <- names rt |
482 | Just $ do | 482 | Just $ do |
483 | let oname = Char8.concat $ take 1 onames | 483 | let oname = Char8.concat $ take 1 onames |
484 | bUnprivileged = False -- TODO | 484 | bUnprivileged = False -- TODO |
@@ -535,7 +535,7 @@ writePublicKeyFiles rt mkpath grip oname wkaddr commit = do | |||
535 | namedContact kd = do | 535 | namedContact kd = do |
536 | -- The getHostnames command requires a valid cross-signed tor key | 536 | -- The getHostnames command requires a valid cross-signed tor key |
537 | -- for each onion name returned in (_,(ns,_)). | 537 | -- for each onion name returned in (_,(ns,_)). |
538 | let (addr,(ns,_)) = getHostnames kd | 538 | let Hostnames addr ns _ _ = getHostnames kd |
539 | fmap (\n -> (n,addr, kd)) $ listToMaybe ns -- only first onion name. | 539 | fmap (\n -> (n,addr, kd)) $ listToMaybe ns -- only first onion name. |
540 | 540 | ||
541 | known_hosts = L.concat $ map getssh onionkeys | 541 | known_hosts = L.concat $ map getssh onionkeys |