A group of functions for verifying New Zealand COVID Passes.
More...
A group of functions for verifying New Zealand COVID Passes.
Example Usage
#include <nzcp.h>
if (error == NZCP_E_SUCCESS) {
printf(
"jti: %s\n", verification_result.
jti);
printf(
"iss: %s\n", verification_result.
iss);
printf(
"nbf: %d\n", verification_result.
nbf);
printf(
"exp: %d\n", verification_result.
exp);
printf(
"given_name: %s\n", verification_result.
given_name);
printf(
"family_name: %s\n", verification_result.
family_name);
printf(
"dob: %s\n", verification_result.
dob);
}
else {
}
◆ nzcp_error
The nzcp_error enum used for verfication errors.
This is the type used to represent NZCP errors in the nzcp_verify_pass_uri function.
◆ nzcp_error
The nzcp_error enum used for verfication errors.
This is the type used to represent NZCP errors in the nzcp_verify_pass_uri function.
◆ nzcp_error_string()
Returns the error description for the given error code.
- Parameters
-
- Returns
- const char*
◆ nzcp_free_verification_result()
Frees nzcp_verification_result struct. Run this after you're done with the result.
- Parameters
-
[in] | verification_result | Pointer to verification result struct |
◆ nzcp_verify_pass_uri()
Verifies New Zealand COVID Pass URI.
- Parameters
-
[in] | pass_uri | Null-terminted buffer with the URI |
[out] | verification_result | Pointer to verification result struct |
[in] | is_example | Whether the pass_uri uses example or live MOH DID document |
- Returns
- nzcp_error
nzcp_error nzcp_verify_pass_uri(uint8_t *pass_uri, nzcp_verification_result *verification_result, bool is_example)
Verifies New Zealand COVID Pass URI.