diff options
author | Andrew Cady <d@jerkface.net> | 2019-07-03 16:30:58 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-07-03 16:30:58 -0400 |
commit | 7764b1b8a3fd0df5bbd8c6742b85cfecc453c5cc (patch) | |
tree | bb302849a6253c14a7016a1a01e8272fbbf8620a /lib | |
parent | a6099f2263f3ac7688244b1406ea2891d429d41c (diff) |
remove unused functions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kiki.hs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/Kiki.hs b/lib/Kiki.hs index d2da996..af62a97 100644 --- a/lib/Kiki.hs +++ b/lib/Kiki.hs | |||
@@ -150,6 +150,11 @@ spawn :: CommonArgsParsed -> SymmetricAlgorithm -> FilePath -> IO () | |||
150 | spawn cmn cipher path = do | 150 | spawn cmn cipher path = do |
151 | putStrLn "TODO: implement keygen.sh replacement.sh" | 151 | putStrLn "TODO: implement keygen.sh replacement.sh" |
152 | 152 | ||
153 | mkdirFor :: FilePath -> IO () | ||
154 | mkdirFor path = do | ||
155 | let dir = takeDirectory path | ||
156 | createDirectoryIfMissing True dir | ||
157 | |||
153 | importAndRefresh :: (FilePath -> FilePath) -> CommonArgsParsed -> SymmetricAlgorithm -> IO () | 158 | importAndRefresh :: (FilePath -> FilePath) -> CommonArgsParsed -> SymmetricAlgorithm -> IO () |
154 | importAndRefresh root cmn cipher = do | 159 | importAndRefresh root cmn cipher = do |
155 | let rootdir = do guard (root "x" /= "x") | 160 | let rootdir = do guard (root "x" /= "x") |
@@ -160,14 +165,6 @@ importAndRefresh root cmn cipher = do | |||
160 | bool id (error "--chroot requires an argument") (rootdir==Just "") $ do | 165 | bool id (error "--chroot requires an argument") (rootdir==Just "") $ do |
161 | let homespec = mplus (slash <$> rootdir <*> cap_homespec cmn) | 166 | let homespec = mplus (slash <$> rootdir <*> cap_homespec cmn) |
162 | (fmap (++"/root/.gnupg") rootdir) | 167 | (fmap (++"/root/.gnupg") rootdir) |
163 | sshkeygen size = Just $ concat [ "mkdir -p \"$(dirname $file)\" && " | ||
164 | , "ssh-keygen -P \"\" -q -f $file -b " | ||
165 | , show size ] | ||
166 | mkdirFor path = do | ||
167 | let dir = takeDirectory path | ||
168 | -- putStrLn $ "mkdirFor " ++ show dir | ||
169 | createDirectoryIfMissing True dir | ||
170 | -- ssl = Just "mkdir -p \"$(dirname $file)\" && openssl genrsa -out $file 1024" | ||
171 | (home,secring,pubring,mbwk) <- unconditionally $ getHomeDir homespec | 168 | (home,secring,pubring,mbwk) <- unconditionally $ getHomeDir homespec |
172 | osHomeDir <- if bUnprivileged then getHomeDirectory else return "/root" | 169 | osHomeDir <- if bUnprivileged then getHomeDirectory else return "/root" |
173 | 170 | ||
@@ -482,8 +479,6 @@ refreshCache rt rootdir = do | |||
482 | flip (maybe $ warn "missing working key?") (rtWorkingKey rt) $ \wk -> do | 479 | flip (maybe $ warn "missing working key?") (rtWorkingKey rt) $ \wk -> do |
483 | 480 | ||
484 | let grip = fingerprint wk | 481 | let grip = fingerprint wk |
485 | wkkd = rtKeyDB rt Map.! keykey wk | ||
486 | getSecret tag = sortOn (Down . timestamp) $ getSubkeys Unsigned wk (keySubKeys wkkd) tag | ||
487 | exportOp = passphrases <> pemSecrets <> minimalOp (CommonArgsParsed (Just $ takeDirectory $ rtPubring rt) Nothing) | 482 | exportOp = passphrases <> pemSecrets <> minimalOp (CommonArgsParsed (Just $ takeDirectory $ rtPubring rt) Nothing) |
488 | where | 483 | where |
489 | passphrases = mempty { opPassphrases = [PassphraseMemoizer (rtPassphrases rt)] } | 484 | passphrases = mempty { opPassphrases = [PassphraseMemoizer (rtPassphrases rt)] } |