identity: verify-sdjwt on the command line (an SD-JWT+KB checked with the issuer key you give; Aere Cloud runs it behind POST /v1/identity/sd-jwt/verify)

The issuer key (a public JWK, or the public keys of an AERE identity) is checked first: one that cannot be read, is private, or is not
a key for the algorithm asked exits 2 with the reason, instead of reporting the token INVALID. --json prints compact JSON (indented
output grew with the square of the claims' nesting depth). --at judges at a given time, as for verify. Test on the RFC 9901 example
presentation: valid at its own time, invalid now, a private key refused. Tests: SD-JWT 23/23, negative control 28/28; identity 44/44,
negative control 49/49.
This commit is contained in:
Aere Network committed 2026-09-30 13:17:07 +03:00
1 parent 4ffec8d7e3
commit 5f1e60b8d2
6 files changed
+54 -6

No files matched your search

+2 -1
View File
@@ -63,7 +63,8 @@ const PLANTARI = [
['o lista stricata acuza credentialul', L, "verifyText('status-list', canonical(l.statement), l.signature, S.issuer.keys); } catch { return false; } });", "verifyText('status-list', canonical(l.statement), l.signature, S.issuer.keys); } catch (e) { throw e; } });", 'intrari stricate date verificatorului'],
['o revocare stricata acuza prezentarea', L, "try { canonical(R); } catch { nejudecat(`${et}: a revocation`, 'ignored: not readable'); continue; }", '', 'intrari stricate date verificatorului'],
['linia de comanda suprascrie o cheie', C, 'if (privat && fs.existsSync(f)) throw new Folosire(', 'if (false) throw new Folosire(', 'linia de comanda'],
['verify din linia de comanda iese 0 si pe INVALID', C, 'return r.valid ? 0 : 1;', 'return 0;', 'linia de comanda'],
// 2026-09-30: tiparul poarta randul de dinainte, fiindca verify-sdjwt are si el `return r.valid ? 0 : 1;`
['verify din linia de comanda iese 0 si pe INVALID', C, "JSON.stringify(r.claims));\n }\n return r.valid ? 0 : 1;", "JSON.stringify(r.claims));\n }\n return 0;", 'linia de comanda'],
];
const FISIERE = [L, C, 'proba-identity.mjs'];
function copie() {