Merge commit 'f0217cdbde4334bfe2fad7fa484cfa000241ea08' into HEAD
diff --git a/gatekeeper_messages.cpp b/gatekeeper_messages.cpp
index c803666..fc76d5e 100644
--- a/gatekeeper_messages.cpp
+++ b/gatekeeper_messages.cpp
@@ -199,6 +199,7 @@
}
VerifyResponse::VerifyResponse() {
+ request_reenroll = false;
memset_s(&auth_token, 0, sizeof(auth_token));
};
diff --git a/tests/gatekeeper_device_test.cpp b/tests/gatekeeper_device_test.cpp
index d2283ec..0e7ace6 100644
--- a/tests/gatekeeper_device_test.cpp
+++ b/tests/gatekeeper_device_test.cpp
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <endian.h>
#include <gtest/gtest.h>
#include <hardware/gatekeeper.h>
#include <gatekeeper/gatekeeper.h> // For password_handle_t
@@ -97,7 +98,7 @@
hat = reinterpret_cast<hw_auth_token_t *>(auth_token);
ASSERT_EQ(HW_AUTH_TOKEN_VERSION, hat->version);
- ASSERT_EQ(HW_AUTH_PASSWORD, hat->authenticator_type);
+ ASSERT_EQ(htonl(HW_AUTH_PASSWORD), hat->authenticator_type);
}
TEST_F(GateKeeperDeviceTest, EnrollAndVerifyTimeout) {
@@ -195,7 +196,7 @@
password_payload, password_len, &auth_token, &auth_token_len,
&should_reenroll);
// shoudln't be a timeout
- ASSERT_LT(0, ret);
+ ASSERT_LT(ret, 0);
}
}