Contains code that is common across digital health cards (vc and eu dgc)
Verification covers:
- Identity level
- For v1, SafetyPASS just show the person's picture does NOT name check
- Vaccination Credential Level
- Cards signature verifications
- Get issuers public key - passed/failed
- Verify card signature with issuers public key - passed/failed/not-checked
- Card expired
- Verify card not expired using exp - passed/failed/one
- The issuer verifications
- The issuer is on the CommonTrust or EP3 networks whitelist - passed/failed
- The immunization requirements
- Is a trusted vaccine - may vary by country - passed/failed
- Vaccine specific
- The required number of shots have been had
- The time between doses was not exceeded, for example 17-92 days
- At least some number of days (typically 14) has elapsed since last dose
- future - Booster shots TDB how to handle
- Cards signature verifications
The card states are as follows, the order is ranked so check in that order
- UnKnown no verifications have been performed
- Valid (Green)
- The card structure verifications have passed
- The card has not expired
- The issuer is trusted
- The immunization requirements have been met
- Corrupted Card (Red)
- Fetched issuer key and the signature is bad no other checks made
- Note invalid cards cannot be loaded, but maybe something happened since loaded, or issuer key changed
- Fetched issuer key and the signature is bad no other checks made
- UnVerified (Orange) if cannot check signature then all else is untrusted
- get key failed so cannot check signature
- Safety Criteria Not Met (Orange) if safety criteria are not met does not matter if issuer is unknown or expired
- vaccine on whitelist: passed/failed
- required number shots have been met: passed/failed
- The time between doses was not exceeded, for example 17-92 days: passed/failed
- At least some number of days (typically 14) has elapsed since last dose: passed/failed
- Issuer Unknown -(Orange) if issuer unknown then cannot trust
- issuer trusted - failed
- Expired - (Orange) if expired but trusted issuer and safety checks made it may be ok
- card expired