diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2021-09-16 23:03:12 +0200 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-09-21 22:25:03 +0200 |
commit | fa486f2e136a898d1b1548ec90757a78c65a0b70 (patch) | |
tree | 7601f939c6859547cc2df38e587c5d9473bae76d /tests/jwk-kty-rsa-incorrect.scm | |
parent | 86bd90866fdc2ab5234c6e09e39bfa972f7fa395 (diff) |
JWK: document it, and use GOOPS
Diffstat (limited to 'tests/jwk-kty-rsa-incorrect.scm')
-rw-r--r-- | tests/jwk-kty-rsa-incorrect.scm | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/jwk-kty-rsa-incorrect.scm b/tests/jwk-kty-rsa-incorrect.scm index a13b430..c86297a 100644 --- a/tests/jwk-kty-rsa-incorrect.scm +++ b/tests/jwk-kty-rsa-incorrect.scm @@ -22,14 +22,13 @@ (with-test-environment "jwk-kty-rsa-incorrect" (lambda () - (let* ((key (json-string->scm "{\"kty\":\"RSA\",\"e\":\"AQAB\",\"kid\":\"db7cdbbf-0ca3-48da-abf6-8f34002a4651\",\"n\":\"--\"}")) - (kty - (with-exception-handler - (lambda (exn) - #f) - (lambda () - (kty key)) - #:unwind? #t - #:unwind-for-type ¬-a-jwk))) - (when kty - (exit 1))))) + (with-exception-handler + (lambda (exn) + (unless (not-a-jwk? exn) + (exit 1)) + #f) + (lambda () + (jwk->key (json-string->scm "{\"kty\":\"RSA\",\"e\":\"AQAB\",\"kid\":\"db7cdbbf-0ca3-48da-abf6-8f34002a4651\",\"n\":\"--\"}")) + (exit 2)) + #:unwind? #t + #:unwind-for-type ¬-a-jwk))) |