verificac19-sdk
verificac19-sdk copied to clipboard
Validation error for recently issued recovery Green Pass
I get "Not Valid" reply when I send payloads to the validator using recently issued Green Passes.
Certificate type: recovery
I get instead "Valid" reply while using older certificates of the same type.
{ "result": "KO", "reason": "NOT_VALID", "person_data": { "person": "--- --- ---", "dob": "23/01/1987" }, "device_id": 1, "instance_id": 1, "ci": "--- --- ---", "certificate_type": "recovery" }
I can privately share the payloads I am working with.
I put my hand on the validator and I reckon I've found the issue. I don't know why, but some keys used to sign green passes are not recognized.
This is where the validation process fails. The commented part is to bypass signature validation.
const buildResponse = (certificate, rulesResult, signatureOk) => {
let motivation = rulesResult;
/*if (!signatureOk) {
motivation = {
code: NOT_VALID,
result: false,
message: 'Invalid signature',
};
}*/
return {
person: certificate.person ? `${certificate.person.givenName} ${certificate.person.familyName}` : null,
date_of_birth: certificate.dateOfBirth ? certificate.dateOfBirth : null,
...motivation,
};
};
Any suggestion about how to tackle the issue?
Hi @drcoccodrillus sorry for my late response! Where your certificate has been issued from?
Hi @astagi! Thank you for your reply and my apologies for answering you after one month. The mentioned green passes where issued by the Italian government. I noticed that mostly the green passes that where bounced by the validator are the temporary one which are coded as "swab". After few days they are always substituted whit a new GP coded as "Cured of COVID-19" and these are correctly validated.
Example:
No problem @drcoccodrillus , glad your problem has disappeared :) I can close this issue then!