summaryrefslogtreecommitdiff
path: root/lib/KeyRing.hs
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-06-24 21:18:22 -0400
committerJoe Crayne <joe@jerkface.net>2019-06-30 22:57:30 -0400
commit7c2ee942309df7a484f3ab50b1b090ca5e606c03 (patch)
tree85fe2a2373e46b821774f6b95df5eff8da39a730 /lib/KeyRing.hs
parent26af6c505812c9749f5e972d38fc8b771fab5de6 (diff)
move functions around between files. nothing should be different
merge-note: I'm having trouble with the merge, so I'm leaving a lot of functions duplicated in lib/Keyring.hs that were originally moved-out to lib/KeyRing/BuildKeyDB.hs in this commit. I'll clean-up later. Hopefully.
Diffstat (limited to 'lib/KeyRing.hs')
-rw-r--r--lib/KeyRing.hs122
1 files changed, 30 insertions, 92 deletions
diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs
index 1aed50e..244f880 100644
--- a/lib/KeyRing.hs
+++ b/lib/KeyRing.hs
@@ -24,98 +24,7 @@
24{-# LANGUAGE PatternGuards #-} 24{-# LANGUAGE PatternGuards #-}
25{-# LANGUAGE ForeignFunctionInterface #-} 25{-# LANGUAGE ForeignFunctionInterface #-}
26{-# LANGUAGE LambdaCase #-} 26{-# LANGUAGE LambdaCase #-}
27module KeyRing 27module KeyRing (module KeyRing.Types, module KeyRing, module KeyRing.BuildKeyDB)
28 (
29 -- * Error Handling
30 KikiResult(..)
31 , KikiCondition(..)
32 , KikiReportAction(..)
33 , errorString
34 , reportString
35 -- * Manipulating Keyrings
36 , runKeyRing
37 , KeyRingOperation(..)
38 , PassphraseSpec(..)
39 , Transform(..)
40 -- , PacketUpdate(..)
41 -- , guardAuthentic
42 -- * Describing File Operations
43 , StreamInfo(..)
44 , Access(..)
45 , FileType(..)
46 , InputFile(..)
47 , Initializer(..)
48 , KeyFilter(..)
49 -- * Results of a KeyRing Operation
50 , KeyRingRuntime(..)
51 , OriginMapped(..)
52 , MappedPacket
53 , KeyDB
54 , KeyData(..)
55 , SubKey(..)
56 , keyflags
57 -- * Miscelaneous Utilities
58 , isKey
59 , isSecretKey
60 , derRSA
61 , derToBase32
62 , backsig
63 , filterMatches
64 , flattenKeys
65 , flattenTop
66 , Hosts.Hosts
67 , isCryptoCoinKey
68 , matchpr
69 , parseSpec
70 , Spec
71 , parseUID
72 , UserIDRecord(..)
73 , pkcs8
74 , RSAPublicKey(..)
75 , PKCS8_RSAPublicKey(..)
76 , rsaKeyFromPacket
77 , secretToPublic
78 , selectPublicKey
79 , selectSecretKey
80 , usage
81 , usageString
82 , walletImportFormat
83 , writePEM
84 , getBindings
85 , accBindings
86 , isSubkeySignature
87 , torhash
88 , torUIDFromKey
89 , ParsedCert(..)
90 , parseCertBlob
91 , packetFromPublicRSAKey
92 , decodeBlob
93 , selectPublicKeyAndSigs
94 , x509cert
95 , getHomeDir
96 , unconditionally
97 , SecretPEMData(..)
98 , readSecretPEMFile
99 , writeInputFileL
100 , InputFileContext(..)
101 , onionNameForContact
102 , keykey
103 , keyPacket
104 , KeySpec(..)
105 , MatchingField(..)
106 , SpecError(..)
107 , SingleKeySpec(..)
108 , parseSpec3
109 , getHostnames
110 , secretPemFromPacket
111 , SubkeyStatus(..)
112 , getSubkeys
113 , writeKeyToFile
114 , resolveForReport
115 , KeyKey -- needed for Type sigs
116 , makeMemoizingDecrypter
117 , showPacket
118 ) where
119 28
120import System.Environment 29import System.Environment
121import Control.Monad 30import Control.Monad
@@ -214,6 +123,35 @@ import FunctorToMaybe
214import DotLock 123import DotLock
215import ProcessUtils (systemEnv, ExitCode(ExitFailure, ExitSuccess) ) 124import ProcessUtils (systemEnv, ExitCode(ExitFailure, ExitSuccess) )
216import GnuPGAgent as Agent 125import GnuPGAgent as Agent
126import KeyRing.BuildKeyDB (accBindings, backsig, buildKeyDB,
127 combineTransforms, concatSort,
128 derRSA, derToBase32, filterMatches,
129 findTag, fingerdress,
130 flattenAllUids, flattenKeys,
131 flattenSub, flattenTop,
132 generateInternals, getBindings,
133 getHostnames, getSubkeys,
134 importSecretKey, insertSubkey,
135 isKey, isSecretKey,
136 isSubkeySignature, isUserID,
137 keyFlags0, keyPacket, keyflags,
138 keykey, mappedPacket, matchSpec,
139 matchpr, merge, mergeKeyPacket,
140 mkUsage, origin,
141 packetFromPublicRSAKey,
142 parseCertBlob, parseSingleSpec,
143 parseSpec, parseUID,
144 performManipulations,
145 readInputFileL, readSecretPEMFile,
146 resolveForReport, resolveInputFile,
147 rsaKeyFromPacket, secp256k1_id,
148 secretToPublic, seek_key,
149 selectKey0, selectPublicKey,
150 showPacket, sortByHint,
151 subkeyMappedPacket, torhash, try,
152 usage, usageFromFilter,
153 usageString)
154
217import Types 155import Types
218import PacketTranscoder 156import PacketTranscoder
219import Transforms 157import Transforms