diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-17 15:38:35 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-17 15:38:35 -0400 |
commit | aa0bb2e43b6de5301939ca4dad2f5e264e469227 (patch) | |
tree | 3122d322bcd73f2177d28e98f72b96e8437644a1 /keysafe.hs | |
parent | efee99a335b36ae6265662f3afd7fbfaf75420d2 (diff) | |
download | keysafe-aa0bb2e43b6de5301939ca4dad2f5e264e469227.tar.gz |
simplify
Don't need to check key server for --gpgkeyid backup, because the same
switch has to be provided at restore time.
Diffstat (limited to 'keysafe.hs')
-rw-r--r-- | keysafe.hs | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -48,19 +48,14 @@ dispatch cmdline ui tunables = do go mode (CmdLine.secretkeysource cmdline) where storage = CmdLine.storage cmdline - go CmdLine.Backup (Just secretkeysource@(GpgKey kid)) = do - ok <- Gpg.knownByKeyServer kid - unless ok $ - showError ui "Your gpg public key has to be stored on the keyservers before you can back it up by keyid. Either use gpg --send-key to store the public key on the keyservers, or omit the --gpgkeyid option" - backup storage ui tunables secretkeysource - =<< getSecretKey secretkeysource go CmdLine.Backup (Just secretkeysource) = backup storage ui tunables secretkeysource =<< getSecretKey secretkeysource - go CmdLine.Backup Nothing = - backup storage ui tunables Gpg.anyKey =<< Gpg.getKeyToBackup ui go CmdLine.Restore (Just secretkeydest) = restore storage ui secretkeydest + go CmdLine.Backup Nothing = + backup storage ui tunables Gpg.anyKey + =<< Gpg.getKeyToBackup ui go CmdLine.Restore Nothing = restore storage ui Gpg.anyKey go CmdLine.Benchmark _ = |