summaryrefslogtreecommitdiff
path: root/lib/KeyRing/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/KeyRing/Types.hs')
-rw-r--r--lib/KeyRing/Types.hs16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/KeyRing/Types.hs b/lib/KeyRing/Types.hs
index 6b686d5..22937a7 100644
--- a/lib/KeyRing/Types.hs
+++ b/lib/KeyRing/Types.hs
@@ -1,5 +1,6 @@
1{-# LANGUAGE DeriveAnyClass #-} 1{-# LANGUAGE DeriveAnyClass #-}
2{-# LANGUAGE DeriveFunctor #-} 2{-# LANGUAGE DeriveFunctor #-}
3{-# LANGUAGE PatternSynonyms #-}
3module KeyRing.Types where 4module KeyRing.Types where
4 5
5import Data.Char (isLower,toLower) 6import Data.Char (isLower,toLower)
@@ -179,13 +180,20 @@ data Access = AutoAccess -- ^ secret or public as appropriate based on existing
179 | Pub -- ^ public information 180 | Pub -- ^ public information
180 deriving (Eq,Ord,Show) 181 deriving (Eq,Ord,Show)
181 182
182data FileType = KeyRingFile 183
184data PacketsCodec = DetectAscii | BinaryPackets | AsciiArmor
185 deriving (Eq,Ord,Show)
186
187data FileType = PGPPackets PacketsCodec
183 | PEMFile 188 | PEMFile
184 | WalletFile 189 | WalletFile
185 | DNSPresentation 190 | DNSPresentation
186 | Hosts 191 | Hosts
187 | SshFile 192 | SshFile
188 deriving (Eq,Ord,Enum,Show) 193 deriving (Eq,Ord,Show)
194
195pattern KeyRingFile :: FileType
196pattern KeyRingFile = PGPPackets DetectAscii
189 197
190-- type UsageTag = String 198-- type UsageTag = String
191data Initializer = NoCreate | Internal GenerateKeyParams | External String | WarnMissing String 199data Initializer = NoCreate | Internal GenerateKeyParams | External String | WarnMissing String