diff options
author | joe <joe@jerkface.net> | 2014-04-16 01:41:58 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-16 01:41:58 -0400 |
commit | 1a67a86310aaab9eb010de58b61557924707dcd5 (patch) | |
tree | 65caa3ce0fa6f71a981ea8d1b2241bfd3846c92c | |
parent | f1560618fe37f7ec434e78cabd681802048cfb4c (diff) |
removed rtRings and rtWallets
-rw-r--r-- | KeyRing.hs | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -94,8 +94,6 @@ getUsage _ = mzero | |||
94 | data KeyRingRuntime = KeyRingRuntime | 94 | data KeyRingRuntime = KeyRingRuntime |
95 | { rtPubring :: FilePath | 95 | { rtPubring :: FilePath |
96 | , rtSecring :: FilePath | 96 | , rtSecring :: FilePath |
97 | , rtRings :: [FilePath] | ||
98 | , rtWallets :: [FilePath] | ||
99 | , rtGrip :: Maybe String | 97 | , rtGrip :: Maybe String |
100 | , rtKeyDB :: KeyDB | 98 | , rtKeyDB :: KeyDB |
101 | } | 99 | } |
@@ -910,6 +908,9 @@ runKeyRing :: KeyRingData -> (KeyRingRuntime -> a) -> IO (KikiResult a) | |||
910 | runKeyRing keyring op = do | 908 | runKeyRing keyring op = do |
911 | homedir <- getHomeDir (homeSpec keyring) | 909 | homedir <- getHomeDir (homeSpec keyring) |
912 | let try' :: KikiCondition a -> (a -> IO (KikiResult b)) -> IO (KikiResult b) | 910 | let try' :: KikiCondition a -> (a -> IO (KikiResult b)) -> IO (KikiResult b) |
911 | -- FIXME: try' should probably accept a list of KikiReportActions. | ||
912 | -- This would be useful for reporting on disk writes that have already | ||
913 | -- succeded prior to this termination. | ||
913 | try' v body = | 914 | try' v body = |
914 | case functorToEither v of | 915 | case functorToEither v of |
915 | Left e -> return $ KikiResult e [] | 916 | Left e -> return $ KikiResult e [] |
@@ -951,8 +952,6 @@ runKeyRing keyring op = do | |||
951 | a <- return $ op KeyRingRuntime | 952 | a <- return $ op KeyRingRuntime |
952 | { rtPubring = pubring | 953 | { rtPubring = pubring |
953 | , rtSecring = secring | 954 | , rtSecring = secring |
954 | , rtRings = [] -- todo secring:pubring:keyringFiles keyring | ||
955 | , rtWallets = [] -- todo walletFiles keyring | ||
956 | , rtGrip = grip | 955 | , rtGrip = grip |
957 | , rtKeyDB = db | 956 | , rtKeyDB = db |
958 | } | 957 | } |
@@ -963,7 +962,7 @@ runKeyRing keyring op = do | |||
963 | r <- writeRingKeys keyring db wk secring pubring | 962 | r <- writeRingKeys keyring db wk secring pubring |
964 | try' r $ \report_rings -> do | 963 | try' r $ \report_rings -> do |
965 | 964 | ||
966 | -- writePEMKeys | 965 | -- todo writePEMKeys |
967 | 966 | ||
968 | return $ KikiResult (KikiSuccess a) | 967 | return $ KikiResult (KikiSuccess a) |
969 | $ concat [ report_externals | 968 | $ concat [ report_externals |
@@ -971,8 +970,7 @@ runKeyRing keyring op = do | |||
971 | , report_wallets | 970 | , report_wallets |
972 | , report_rings ] | 971 | , report_rings ] |
973 | 972 | ||
974 | forM_ lked $ \(Just lk, fname) -> do dotlock_release lk | 973 | forM_ lked $ \(Just lk, fname) -> dotlock_release lk |
975 | dotlock_destroy lk -- todo: verify we want this | ||
976 | 974 | ||
977 | return ret | 975 | return ret |
978 | 976 | ||