summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kiki.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/kiki.hs b/kiki.hs
index f939fa4..865e551 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -1570,6 +1570,9 @@ kiki "init-key" args = do
1570 _ -> unconditionally $ return rt 1570 _ -> unconditionally $ return rt
1571 1571
1572 -- Finally, export public keys if they do not exist. 1572 -- Finally, export public keys if they do not exist.
1573 let writeFileWARNING fname bs = do
1574 --TODO
1575 hPutStrLn stderr $ fname ++ ": DID NOT CHECK TRUST (TODO)"
1573 flip (maybe $ warn "missing working key?") (rtGrip rt) $ \grip -> do 1576 flip (maybe $ warn "missing working key?") (rtGrip rt) $ \grip -> do
1574 gotc <- doesFileExist (sshcpathpub) 1577 gotc <- doesFileExist (sshcpathpub)
1575 when (not gotc) $ do 1578 when (not gotc) $ do
@@ -1603,7 +1606,7 @@ kiki "init-key" args = do
1603 flip (maybe $ return ()) mbk $ \k -> do 1606 flip (maybe $ return ()) mbk $ \k -> do
1604 goti <- doesFileExist (cpath) 1607 goti <- doesFileExist (cpath)
1605 when (not goti) $ do 1608 when (not goti) $ do
1606 either warn (writeFile $ cpath) 1609 either warn (writeFileWARNING $ cpath)
1607 $ pemFromPacket k 1610 $ pemFromPacket k
1608 1611
1609 mapM_ installConctact cs 1612 mapM_ installConctact cs
@@ -1640,15 +1643,13 @@ kiki "delete" args = do
1640 1643
1641kiki "tar" args | "--help" `elem` args = do 1644kiki "tar" args | "--help" `elem` args = do
1642 putStr . unlines $ 1645 putStr . unlines $
1643 [ "kiki tar (-c|-A|-t) [--secrets SPEC] [--passphrase-fd FD] [--homedir HOMEDIR]" 1646 [ "kiki tar (-c|-t) [--secrets SPEC] [--passphrase-fd FD] [--homedir HOMEDIR]"
1644 , "" 1647 , ""
1645 , "Import or export a tar archive containing key files in the proper" 1648 , "Import or export a tar archive containing key files in the proper"
1646 , "format for software configuration." 1649 , "format for software configuration."
1647 , "" 1650 , ""
1648 ," -c Generate tar archive on stdout." 1651 ," -c Generate tar archive on stdout."
1649 ,"" 1652 ,""
1650 ," -A Read tar archive on stdin."
1651 ,""
1652 ," -t List filepaths that would be included in the (-c) output archive." 1653 ," -t List filepaths that would be included in the (-c) output archive."
1653 ,"" 1654 ,""
1654 ," --secrets SPEC" 1655 ," --secrets SPEC"
@@ -1675,15 +1676,14 @@ kiki "tar" args | "--help" `elem` args = do
1675 1676
1676kiki "tar" args = do 1677kiki "tar" args = do
1677 let parsed_args = processArgs sargspec [] "" args 1678 let parsed_args = processArgs sargspec [] "" args
1678 sargspec = [("-t",0),("-c",0),("-A",0),("-C",1),("--secrets",1)] 1679 sargspec = [("-t",0),("-c",0),("--secrets",1)]
1679 ismode ("-t":_) = True 1680 ismode ("-t":_) = True
1680 ismode ("-c":_) = True 1681 ismode ("-c":_) = True
1681 ismode ("-A":_) = True
1682 ismode _ = False 1682 ismode _ = False
1683 case filter ismode (fst parsed_args) of 1683 case filter ismode (fst parsed_args) of
1684 ["-t":_] -> tarT parsed_args 1684 ["-t":_] -> tarT parsed_args
1685 ["-c":_] -> tarC parsed_args 1685 ["-c":_] -> tarC parsed_args
1686 ["-A":_] -> putStrLn "unimplemented." 1686 ["-A":_] -> putStrLn "unimplemented." -- import tar file?
1687 _ -> kiki "tar" ["--help"] 1687 _ -> kiki "tar" ["--help"]
1688 1688
1689tarContent rt spec pubpem knownhosts secpem = ipsecs ++ sshs ++ secrets "root" 1689tarContent rt spec pubpem knownhosts secpem = ipsecs ++ sshs ++ secrets "root"