summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Morales2015-04-09 21:23:48 -0500
committerAndres Morales2015-04-10 21:56:07 -0500
commit851b57c1f81bd3572cf5908611ba029be934c706 (patch)
tree783505d76341c9b8af324dce165767de2156f60a /gatekeeperd/IGateKeeperService.cpp
parent9bbd0a5c92ed92c295d2f5ab3befdf3efe490bc9 (diff)
downloadplatform-system-core-851b57c1f81bd3572cf5908611ba029be934c706.tar.gz
platform-system-core-851b57c1f81bd3572cf5908611ba029be934c706.tar.xz
platform-system-core-851b57c1f81bd3572cf5908611ba029be934c706.zip
Add challenge to verify call
required for enrolling secondary auth form factors Change-Id: Ia3e1d47f988bca1bb1a0e713c000886e60b4e839
Diffstat (limited to 'gatekeeperd/IGateKeeperService.cpp')
-rw-r--r--gatekeeperd/IGateKeeperService.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/gatekeeperd/IGateKeeperService.cpp b/gatekeeperd/IGateKeeperService.cpp
index 133df4cbd..933b975de 100644
--- a/gatekeeperd/IGateKeeperService.cpp
+++ b/gatekeeperd/IGateKeeperService.cpp
@@ -68,6 +68,7 @@ status_t BnGateKeeperService::onTransact(
68 case VERIFY: { 68 case VERIFY: {
69 CHECK_INTERFACE(IGateKeeperService, data, reply); 69 CHECK_INTERFACE(IGateKeeperService, data, reply);
70 uint32_t uid = data.readInt32(); 70 uint32_t uid = data.readInt32();
71 uint64_t challenge = data.readInt64();
71 ssize_t currentPasswordHandleSize = data.readInt32(); 72 ssize_t currentPasswordHandleSize = data.readInt32();
72 const uint8_t *currentPasswordHandle = 73 const uint8_t *currentPasswordHandle =
73 static_cast<const uint8_t *>(data.readInplace(currentPasswordHandleSize)); 74 static_cast<const uint8_t *>(data.readInplace(currentPasswordHandleSize));
@@ -78,8 +79,8 @@ status_t BnGateKeeperService::onTransact(
78 static_cast<const uint8_t *>(data.readInplace(currentPasswordSize)); 79 static_cast<const uint8_t *>(data.readInplace(currentPasswordSize));
79 if (!currentPassword) currentPasswordSize = 0; 80 if (!currentPassword) currentPasswordSize = 0;
80 81
81 status_t ret = verify(uid, (uint8_t *) currentPasswordHandle, currentPasswordHandleSize, 82 status_t ret = verify(uid, challenge, (uint8_t *) currentPasswordHandle,
82 (uint8_t *) currentPassword, currentPasswordSize); 83 currentPasswordHandleSize, (uint8_t *) currentPassword, currentPasswordSize);
83 reply->writeNoException(); 84 reply->writeNoException();
84 reply->writeInt32(ret == NO_ERROR ? 1 : 0); 85 reply->writeInt32(ret == NO_ERROR ? 1 : 0);
85 return NO_ERROR; 86 return NO_ERROR;