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.
This commit is contained in:
Joey Hess 2012-09-08 02:02:39 -04:00
parent 3bee6b3c74
commit 0c01348b65
5 changed files with 133 additions and 15 deletions

View file

@ -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)