From 4fc681f78b2e659d3db3da99fe7c640416fb3b43 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Sep 2016 00:26:33 -0400 Subject: Change format of ~/.keysafe/backup.log Allow deserializing SecretKeySource so we can later know what gpg keys are backed up. Converted KeyId to Text as JSON can't handle ByteString. --- CmdLine.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index a41a759..686fcb5 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -12,6 +12,7 @@ import Tunables import qualified Gpg import Options.Applicative import qualified Data.ByteString.UTF8 as BU8 +import qualified Data.Text as T import System.Directory import Network.Wai.Handler.Warp (Port) @@ -79,7 +80,7 @@ parse = CmdLine ( long "test" <> help "Run test suite." ) - gpgswitch = GpgKey . KeyId . BU8.fromString <$> strOption + gpgswitch = GpgKey . KeyId . T.pack <$> strOption ( long "gpgkeyid" <> metavar "KEYID" <> help "Specify keyid of gpg key to back up or restore. (When this option is used to back up a key, it must also be used at restore time.)" -- cgit v1.2.3