diff options
Diffstat (limited to 'CmdLine.hs')
-rw-r--r-- | CmdLine.hs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -8,6 +8,7 @@ module CmdLine where import Types import Types.Storage import Tunables +import Servers (HostName) import qualified Gpg import Options.Applicative import qualified Data.ByteString.UTF8 as BU8 @@ -27,7 +28,7 @@ data CmdLine = CmdLine , serverConfig :: ServerConfig } -data Mode = Backup | Restore | UploadQueued | Server | Benchmark | Test +data Mode = Backup | Restore | UploadQueued | Server | Chaff HostName | Benchmark | Test deriving (Show) data ServerConfig = ServerConfig @@ -38,7 +39,7 @@ data ServerConfig = ServerConfig parse :: Parser CmdLine parse = CmdLine - <$> optional (backup <|> restore <|> uploadqueued <|> server <|> benchmark <|> test) + <$> optional (backup <|> restore <|> uploadqueued <|> server <|> chaff <|> benchmark <|> test) <*> optional (gpgswitch <|> fileswitch) <*> localstorageswitch <*> localstoragedirectoryopt @@ -65,6 +66,11 @@ parse = CmdLine ( long "server" <> help "Run as a keysafe server, accepting objects and storing them to ~/.keysafe/objects/local/" ) + chaff = Chaff <$> strOption + ( long "chaff" + <> metavar "HOSTNAME" + <> help "Upload random data to a keysafe server." + ) benchmark = flag' Benchmark ( long "benchmark" <> help "Benchmark speed of keysafe's cryptographic primitives." |