broke out fairly generic ssh stuff to Assistant.Ssh so pairing can use it too

I'd rather Utility.Ssh, but the SshData type is not sufficiently clean and
generic for Utility.
This commit is contained in:
Joey Hess 2012-09-10 15:20:18 -04:00
parent 34a0e09d4b
commit b573d91aa2
5 changed files with 161 additions and 139 deletions

View file

@ -8,6 +8,7 @@
module Assistant.Pairing where
import Utility.Verifiable
import Assistant.Ssh
import Control.Concurrent
import Network.Socket
@ -40,7 +41,7 @@ data PairData = PairData
, remoteAddress :: SomeAddr
, remoteUserName :: UserName
, remoteDirectory :: FilePath
, sshPubKey :: SshPubKey
, remoteSshPubKey :: SshPubKey
}
deriving (Eq, Read, Show)
@ -52,6 +53,7 @@ type UserName = String
data PairingInProgress = PairingInProgress
{ inProgressSecret :: Secret
, inProgressThreadId :: ThreadId
, inProgressSshKeyPair :: SshKeyPair
}
data SomeAddr = IPv4Addr HostAddress | IPv6Addr HostAddress6