diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-08 02:02:39 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-08 02:02:39 -0400 |
commit | 0c01348b65bb3d0364f90ce9785236fa05985f75 (patch) | |
tree | c96bb6612882c6db04a8a4b48f34dead0f6ec3c6 /Assistant/Pairing.hs | |
parent | 3bee6b3c74cede7c9099e6bf298ffa585ebf3b80 (diff) |
pairing passphrase entry form, validation, etc
Actually 3 forms in one, this handles the initial passphrase entry, and the
confirmation, and also varys wording if the same user or a different user
is confirming.
Diffstat (limited to 'Assistant/Pairing.hs')
-rw-r--r-- | Assistant/Pairing.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Assistant/Pairing.hs b/Assistant/Pairing.hs index f384895bd..8a9d897eb 100644 --- a/Assistant/Pairing.hs +++ b/Assistant/Pairing.hs @@ -21,14 +21,20 @@ data PairReq = PairReq (Verifiable PairData) data PairAck = PairAck (Verifiable PairData) deriving (Eq, Read, Show) +fromPairReq :: PairReq -> Verifiable PairData +fromPairReq (PairReq v) = v + +fromPairAck :: PairAck -> Verifiable PairData +fromPairAck (PairAck v) = v + data PairMsg = PairReqM PairReq | PairAckM PairAck deriving (Eq, Read, Show) data PairData = PairData - { hostName :: HostName - , userName :: UserName + { remoteHostName :: HostName + , remoteUserName :: UserName , sshPubKey :: Maybe SshPubKey } deriving (Eq, Read, Show) |