- Have the PublicKeyCredentials provide the secure version being used on the client, so when we
eventually change how the handshake works, we can maintain backwards compatability with the old clients git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6479 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -48,6 +48,15 @@ public class PublicKeyCredentials extends Credentials
|
||||
_secret = SecureUtil.createRandomKey(16);
|
||||
_salt = SecureUtil.createRandomKey(4);
|
||||
_encodedSecret = SecureUtil.encryptBytes(key, _secret, _salt);
|
||||
_secureVersion = SecureUtil.VERSION;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the secure version the client is using.
|
||||
*/
|
||||
public int getSecureVersion ()
|
||||
{
|
||||
return _secureVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,6 +90,9 @@ public class PublicKeyCredentials extends Credentials
|
||||
/** Our verification salt. */
|
||||
protected byte[] _salt;
|
||||
|
||||
/** Our secure version. */
|
||||
protected int _secureVersion;
|
||||
|
||||
/** Our secret key. */
|
||||
protected transient byte[] _secret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user