add a UUID to pair requests

Pair requests the the same UUID are part of the same pairing session,
which allows us to detect attempts to brute force the shared secret,
as that will result in pair requests with the same UUID that are
not verified with the right secret.
This commit is contained in:
Joey Hess 2012-09-11 03:16:00 -04:00
parent b3f4c6eb68
commit 0208d6aa82
3 changed files with 26 additions and 7 deletions

View file

@ -7,6 +7,7 @@
module Assistant.Pairing where
import Common.Annex
import Utility.Verifiable
import Assistant.Ssh
@ -49,6 +50,7 @@ data PairData = PairData
, remoteUserName :: UserName
, remoteDirectory :: FilePath
, remoteSshPubKey :: SshPubKey
, pairUUID :: UUID
}
deriving (Eq, Read, Show)