summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-16 13:40:52 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-16 13:40:52 -0400
commitc9c476ae7216b80932b80870a2cd06f9339306aa (patch)
treead2255c1d331bb2f286d7786e65151ba987a8247 /Types.hs
parent3229b02f0aa6bb23e351d00ade1263851a2f1826 (diff)
downloadkeysafe-c9c476ae7216b80932b80870a2cd06f9339306aa.tar.gz
improve options to select secret key to backup/restore
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs12
1 files changed, 5 insertions, 7 deletions
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 }