diff options
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))) |