@@ -169,6 +169,7 @@ const getCOSEStructure = (uri: string): DecodedCOSEStructure => {
169
169
message : "The payload of the QR Code MUST be a string" ,
170
170
section : "4.3" ,
171
171
link : "https://nzcp.covid19.health.nz/#2d-barcode-encoding" ,
172
+ description : "The COVID Pass is malformed or has been modified."
172
173
} ,
173
174
} ) ;
174
175
}
@@ -183,6 +184,7 @@ const getCOSEStructure = (uri: string): DecodedCOSEStructure => {
183
184
"The payload of the QR Code MUST be in the form `NZCP:/<version-identifier>/<base32-encoded-CWT>`" ,
184
185
section : "4.4" ,
185
186
link : "https://nzcp.covid19.health.nz/#2d-barcode-encoding" ,
187
+ description : "The QR code is not a valid NZ COVID Pass"
186
188
} ,
187
189
} ) ;
188
190
}
@@ -198,6 +200,7 @@ const getCOSEStructure = (uri: string): DecodedCOSEStructure => {
198
200
"The payload of the QR Code MUST begin with the prefix of `NZCP:/`" ,
199
201
section : "4.5" ,
200
202
link : "https://nzcp.covid19.health.nz/#2d-barcode-encoding" ,
203
+ description : "The QR code is not a valid NZ COVID Pass"
201
204
} ,
202
205
} ) ;
203
206
}
@@ -214,6 +217,7 @@ const getCOSEStructure = (uri: string): DecodedCOSEStructure => {
214
217
"The version-identifier portion of the payload for the specification MUST be 1" ,
215
218
section : "4.6" ,
216
219
link : "https://nzcp.covid19.health.nz/#2d-barcode-encoding" ,
220
+ description : "The QR code is not a valid NZ COVID Pass"
217
221
} ,
218
222
} ) ;
219
223
}
@@ -235,6 +239,7 @@ const getCOSEStructure = (uri: string): DecodedCOSEStructure => {
235
239
message : "The payload of the QR Code MUST be base32 encoded" ,
236
240
section : "4.7" ,
237
241
link : "https://nzcp.covid19.health.nz/#2d-barcode-encoding" ,
242
+ description : "The COVID Pass is malformed or has been modified."
238
243
} ,
239
244
} ) ;
240
245
}
@@ -288,6 +293,7 @@ const getCWTHeaders = (
288
293
"`kid` header MUST be present in the protected header section of the `COSE_Sign1` structure" ,
289
294
section : "2.2.1.1" ,
290
295
link : "https://nzcp.covid19.health.nz/#cwt-headers" ,
296
+ description : "The COVID Pass is malformed or has been modified."
291
297
} ,
292
298
} ) ;
293
299
}
@@ -300,6 +306,7 @@ const getCWTHeaders = (
300
306
"`alg` claim value MUST be present in the protected header section of the `COSE_Sign1` structure and MUST be set to the value corresponding to `ES256` algorithm registration" ,
301
307
section : "2.2.2.2" ,
302
308
link : "https://nzcp.covid19.health.nz/#cwt-headers" ,
309
+ description : "The COVID Pass is malformed or has been modified."
303
310
} ,
304
311
} ) ;
305
312
}
@@ -330,6 +337,7 @@ const getIss = (
330
337
message : "Issuer claim MUST be present" ,
331
338
section : "2.1.0.2.1" ,
332
339
link : "https://nzcp.covid19.health.nz/#cwt-claims" ,
340
+ description : "The COVID Pass is malformed or has been modified."
333
341
} ,
334
342
} ) ;
335
343
}
@@ -344,6 +352,7 @@ const getIss = (
344
352
"`iss` value reported in the pass does not match one listed in the trusted issuers" ,
345
353
link : "https://nzcp.covid19.health.nz/#trusted-issuers" ,
346
354
section : "6.3" ,
355
+ description : "The COVID Pass was not issued by a trusted issuer"
347
356
} ,
348
357
} ) ;
349
358
}
@@ -368,6 +377,7 @@ const getCredentialSubject = (
368
377
"The public key referenced by the decoded CWT MUST be listed/authorized under the assertionMethod verification relationship in the resolved DID document." ,
369
378
link : "https://nzcp.covid19.health.nz/#did-document" ,
370
379
section : "5.1.1" ,
380
+ description : "The COVID Pass is malformed or has been modified."
371
381
} ,
372
382
} ) ;
373
383
}
@@ -382,6 +392,7 @@ const getCredentialSubject = (
382
392
"The public key referenced by the decoded CWT MUST be listed/authorized under the assertionMethod verification relationship in the resolved DID document." ,
383
393
link : "https://nzcp.covid19.health.nz/#did-document" ,
384
394
section : "5.1.1" ,
395
+ description : "The COVID Pass is malformed or has been modified."
385
396
} ,
386
397
} ) ;
387
398
}
@@ -393,6 +404,7 @@ const getCredentialSubject = (
393
404
"No matching verificationMethod method for the assertionMethod" ,
394
405
link : "https://nzcp.covid19.health.nz/#ref:DID-CORE" ,
395
406
section : "DID-CORE.2" ,
407
+ description : "The COVID Pass is malformed or has been modified."
396
408
} ,
397
409
} ) ;
398
410
}
@@ -405,6 +417,7 @@ const getCredentialSubject = (
405
417
message : "No matching verificationMethod for the assertionMethod" ,
406
418
link : "https://nzcp.covid19.health.nz/#ref:DID-CORE" ,
407
419
section : "DID-CORE.2" ,
420
+ description : "The COVID Pass is malformed or has been modified."
408
421
} ,
409
422
} ) ;
410
423
}
@@ -422,6 +435,7 @@ const getCredentialSubject = (
422
435
"The public key referenced by the decoded CWT MUST be a valid P-256 public key" ,
423
436
link : "https://nzcp.covid19.health.nz/#did-document" ,
424
437
section : "5.1.2" ,
438
+ description : "The COVID Pass is malformed or has been modified."
425
439
} ,
426
440
} ) ;
427
441
}
@@ -435,6 +449,7 @@ const getCredentialSubject = (
435
449
"The expression of the public key referenced by the decoded CWT MUST be in the form of a JWK as per [RFC7517]." ,
436
450
link : "https://nzcp.covid19.health.nz/#did-document" ,
437
451
section : "5.1.3" ,
452
+ description : "The COVID Pass is malformed or has been modified."
438
453
} ,
439
454
} ) ;
440
455
}
@@ -452,6 +467,7 @@ const getCredentialSubject = (
452
467
"This public key JWK expression MUST set a crv property which has a value of P-256. Additionally, the JWK MUST have a kty property set to EC." ,
453
468
link : "https://nzcp.covid19.health.nz/#did-document" ,
454
469
section : "5.1.5" ,
470
+ description : "The COVID Pass is malformed or has been modified."
455
471
} ,
456
472
} ) ;
457
473
}
@@ -472,6 +488,7 @@ const getCredentialSubject = (
472
488
"Retrieved public key does not validate `COSE_Sign1` structure" ,
473
489
link : "https://nzcp.covid19.health.nz/#cryptographic-digital-signature-algorithm-selection" ,
474
490
section : "3" ,
491
+ description : "The COVID Pass is malformed or has been modified."
475
492
} ,
476
493
} ) ;
477
494
}
0 commit comments