From c9c476ae7216b80932b80870a2cd06f9339306aa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Aug 2016 13:40:52 -0400 Subject: improve options to select secret key to backup/restore --- Types.hs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Types.hs') diff --git a/Types.hs b/Types.hs index 799e76e..d3eeccb 100644 --- a/Types.hs +++ b/Types.hs @@ -45,18 +45,16 @@ newtype Password = Password B.ByteString newtype Name = Name B.ByteString deriving (Show) --- | The type of the key that is stored in keysafe. -newtype KeyType = KeyType B.ByteString +-- | Source of the secret key stored in keysafe. +data SecretKeySource = GpgKey KeyId | KeyFile FilePath deriving (Show) -gpgKey :: KeyType -gpgKey = KeyType "gpg" - -- | The keyid is any value that is unique to a private key, and can be -- looked up somehow without knowing the private key. -- --- A gpg keyid is the obvious example. -data KeyId = KeyId KeyType B.ByteString +-- A gpg keyid is the obvious example. But, if a gpg key is not +-- stored on the key servers, keysafe will instead use "". +data KeyId = KeyId B.ByteString deriving (Show) data BenchmarkResult t = BenchmarkResult { expectedBenchmark :: t, actualBenchmark :: t } -- cgit v1.2.3