diff options
Diffstat (limited to 'lib/KeyRing.hs')
-rw-r--r-- | lib/KeyRing.hs | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs index 3da3565..5f43b4f 100644 --- a/lib/KeyRing.hs +++ b/lib/KeyRing.hs | |||
@@ -68,7 +68,7 @@ import Base58 | |||
68 | import FunctorToMaybe | 68 | import FunctorToMaybe |
69 | import DotLock | 69 | import DotLock |
70 | import ProcessUtils (systemEnv, ExitCode(ExitFailure, ExitSuccess) ) | 70 | import ProcessUtils (systemEnv, ExitCode(ExitFailure, ExitSuccess) ) |
71 | import KeyRing.BuildKeyDB (Hostnames(..), | 71 | import 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' |
@@ -796,8 +792,8 @@ subkeysForExport subspec (KeyData key _ _ subkeys) = do | |||
796 | data PemType = PemPublicKey | PemPrivateKey | PemCertificate | 792 | data PemType = PemPublicKey | PemPrivateKey | PemCertificate |
797 | 793 | ||
798 | pemTypeString :: PemType -> String | 794 | pemTypeString :: PemType -> String |
799 | pemTypeString PemPublicKey = "PUBLIC KEY" | 795 | pemTypeString PemPublicKey = "PUBLIC KEY" |
800 | pemTypeString PemPrivateKey = "PRIVATE KEY" | 796 | pemTypeString PemPrivateKey = "RSA PRIVATE KEY" |
801 | pemTypeString PemCertificate = "CERTIFICATE" | 797 | pemTypeString PemCertificate = "CERTIFICATE" |
802 | 798 | ||
803 | writePEM :: PemType -> String -> String | 799 | writePEM :: PemType -> String -> String |
@@ -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 | {- | ||
1206 | onionName :: KeyData -> (SockAddr,L.ByteString) | ||
1207 | onionName kd = (addr,name) | ||
1208 | where | ||
1209 | (addr,(name:_,_)) = getHostnames kd | ||
1210 | -} | ||
1211 | |||