auto userHandle = ToBuffer(*pubkey_cred->response->user_handle);
if (userHandle != contents->userId)
{
- std::cout << "Error: invalid userHandle in GA: "
+ std::cout << "Error: invalid userHandle in GA response: "
<< LowercaseHexStringOf(userHandle)
<< std::endl;
contents->testMsg = "Invalid username";
}
}
auto it = contents->createdCredDescs.find(contents->userId);
- if (it == contents->createdCredDescs.end()
- || it->second.id != credentialRawId)
+ if (it == contents->createdCredDescs.end())
{
- std::cout << "Error: invalid credentialRawId in GA: "
+ std::cout << "Error: invalid credentialRawId in GA response: "
+ << LowercaseHexStringOf(credentialRawId)
+ << " is not found" << std::endl;
+ contents->testMsg = "Invalid credentialRawId";
+ goto callback_failed;
+ }
+ else if (it->second.id != credentialRawId)
+ {
+ std::cout << "Error: invalid credentialRawId in GA response: "
<< LowercaseHexStringOf(credentialRawId)
<< " and found(" << LowercaseHexStringOf(it->second.id)
<< ")" << std::endl;