summaryrefslogtreecommitdiff
path: root/lib/KeyRing.hs
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-07-16 11:41:05 -0400
committerAndrew Cady <d@jerkface.net>2019-07-16 17:52:10 -0400
commitf07d60d9c0ff8673a264e984c90bc478987ef873 (patch)
tree2a8d0b7bbffd80f26cf439f514edf9133045f3f2 /lib/KeyRing.hs
parent0110bd961c87e1ca47e649519933b490ec38fd2d (diff)
use all names where previously only ".onion" names were used
Diffstat (limited to 'lib/KeyRing.hs')
-rw-r--r--lib/KeyRing.hs15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs
index 3da3565..cd69042 100644
--- a/lib/KeyRing.hs
+++ b/lib/KeyRing.hs
@@ -68,7 +68,7 @@ import Base58
68import FunctorToMaybe 68import FunctorToMaybe
69import DotLock 69import DotLock
70import ProcessUtils (systemEnv, ExitCode(ExitFailure, ExitSuccess) ) 70import ProcessUtils (systemEnv, ExitCode(ExitFailure, ExitSuccess) )
71import KeyRing.BuildKeyDB (Hostnames(..), 71import KeyRing.BuildKeyDB (allNames', Hostnames,
72 IPsToWriteToHostsFile(..), 72 IPsToWriteToHostsFile(..),
73 buildKeyDB, 73 buildKeyDB,
74 combineTransforms, 74 combineTransforms,
@@ -532,11 +532,7 @@ writeHostsFiles krd ctx (hostdbs0,hostdbs,u1,gpgnames,IPsToWriteToHostsFile outg
532 532
533 -- 3. add hostnames from gpg for addresses not in U 533 -- 3. add hostnames from gpg for addresses not in U
534 let u = foldl' f u1 ans 534 let u = foldl' f u1 ans
535 ans = reverse $ do 535 ans = reverse . filter ((`elem` outgoing_names) . fst) . concat $ allNames' <$> gpgnames
536 Hostnames addr _ ns _ <- gpgnames
537 guard $ addr `elem` outgoing_names -- . null $ Hosts.namesForAddress addr u0
538 n <- ns
539 return (addr,n)
540 f h (addr,n) = Hosts.assignNewName addr n h 536 f h (addr,n) = Hosts.assignNewName addr n h
541 537
542 -- 4. for each host db H, union H with U and write it out as H' 538 -- 4. for each host db H, union H with U and write it out as H'
@@ -1202,10 +1198,3 @@ getHomeDir protohome = do
1202 where topair (x:xs) = (x,xs) 1198 where topair (x:xs) = (x,xs)
1203 return $ lookup "default-key" config >>= listToMaybe 1199 return $ lookup "default-key" config >>= listToMaybe
1204 1200
1205{-
1206onionName :: KeyData -> (SockAddr,L.ByteString)
1207onionName kd = (addr,name)
1208 where
1209 (addr,(name:_,_)) = getHostnames kd
1210-}
1211