The provisioner was throwing an error to the standard printout because

of protobuf. This had to do with the recent change to checking the
Identity Claim Response and the use of the has_credentialBlob check.
This commit is contained in:
Cyrus 2022-01-05 07:36:21 -05:00
parent e598b78518
commit 78e308e67d

View File

@ -143,10 +143,16 @@ int provision() {
RestfulClientProvisioner provisioner;
string response = provisioner.sendIdentityClaim(identityClaim);
hirs::pb::IdentityClaimResponse icr;
if (!icr.ParseFromString(response) || !icr.has_credential_blob()) {
cout << "----> Provisioning failed." << endl;
cout << "The ACA did not send make credential information." << endl;
return 0;
try {
if (response == "" || !icr.has_credential_blob()) {
logger.error("The ACA did not send make credential blob.");
cout << "----> Provisioning failed." << endl;
cout << "The ACA did not send make credential information." << endl;
return 0;
}
} catch (const google::protobuf::FatalException& e) {
logger.error(e.what());
}
string nonceBlob = icr.credential_blob();