diff options
author | Joe Crayne <joe@jerkface.net> | 2019-07-04 06:59:57 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-07-04 07:06:52 -0400 |
commit | be4aea4b72b9544c4a982a883d7b66698d58272d (patch) | |
tree | 4a71fc0f1fde35fc290ba22ecbf441ba8b0ec801 /lib/KeyRing/Types.hs | |
parent | 90d53ed9167c1263909d4488d940d585339d353c (diff) |
Make ready for ascii-armor support.
Diffstat (limited to 'lib/KeyRing/Types.hs')
-rw-r--r-- | lib/KeyRing/Types.hs | 16 |
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 #-} | ||
3 | module KeyRing.Types where | 4 | module KeyRing.Types where |
4 | 5 | ||
5 | import Data.Char (isLower,toLower) | 6 | import 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 | ||
182 | data FileType = KeyRingFile | 183 | |
184 | data PacketsCodec = DetectAscii | BinaryPackets | AsciiArmor | ||
185 | deriving (Eq,Ord,Show) | ||
186 | |||
187 | data 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 | |||
195 | pattern KeyRingFile :: FileType | ||
196 | pattern KeyRingFile = PGPPackets DetectAscii | ||
189 | 197 | ||
190 | -- type UsageTag = String | 198 | -- type UsageTag = String |
191 | data Initializer = NoCreate | Internal GenerateKeyParams | External String | WarnMissing String | 199 | data Initializer = NoCreate | Internal GenerateKeyParams | External String | WarnMissing String |