aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Pairing.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-10 17:53:51 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-10 17:53:51 -0400
commitc20d6f4189e1e0c3a1e8339f772df587fac38748 (patch)
tree9ea59000b21fa1d24904f843dedbab717bfdccbb /Assistant/Pairing.hs
parentb573d91aa27a315fe9b155349a0a90805dc01181 (diff)
responding to pair requests *almost* works
Diffstat (limited to 'Assistant/Pairing.hs')
-rw-r--r--Assistant/Pairing.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Assistant/Pairing.hs b/Assistant/Pairing.hs
index 399c7e50f..b957e0835 100644
--- a/Assistant/Pairing.hs
+++ b/Assistant/Pairing.hs
@@ -34,6 +34,9 @@ fromPairMsg (PairMsg m) = m
pairMsgStage :: PairMsg -> PairStage
pairMsgStage (PairMsg (Verifiable (s, _) _)) = s
+pairMsgData :: PairMsg -> PairData
+pairMsgData (PairMsg (Verifiable (_, d) _)) = d
+
data PairData = PairData
-- uname -n output, not a full domain name
{ remoteHostName :: Maybe HostName
@@ -45,11 +48,11 @@ data PairData = PairData
}
deriving (Eq, Read, Show)
-type SshPubKey = String
type UserName = String
-{- A pairing that is in progress has a secret, and a thread that is
- - broadcasting pairing requests. -}
+{- A pairing that is in progress has a secret, a thread that is
+ - broadcasting pairing messages, and a SshKeyPair that has not yet been
+ - set up on disk. -}
data PairingInProgress = PairingInProgress
{ inProgressSecret :: Secret
, inProgressThreadId :: ThreadId