address review feedback

This commit is contained in:
vishalnayak 2016-09-14 12:08:35 -04:00
parent b1392567d1
commit 455a4ae055
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ func validateMetadata(clientNonce, pendingTime string, storedIdentity *whitelist
//
// This is a weak criterion and hence the `allow_instance_migration` option
// should be used with caution.
if subtle.ConstantTimeCompare([]byte(clientNonce), []byte(storedIdentity.ClientNonce)) == 0 {
if subtle.ConstantTimeCompare([]byte(clientNonce), []byte(storedIdentity.ClientNonce)) != 1 {
if !roleEntry.AllowInstanceMigration {
return fmt.Errorf("client nonce mismatch")
}