From f8aefcf31ab49c063578190ee7f4a2721e5dc035 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Wed, 1 Jan 2020 00:00:00 +0100 Subject: Add a strip function --- tests/jwk-kty-ec-incorrect.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/jwk-kty-ec-incorrect.scm (limited to 'tests/jwk-kty-ec-incorrect.scm') diff --git a/tests/jwk-kty-ec-incorrect.scm b/tests/jwk-kty-ec-incorrect.scm new file mode 100644 index 0000000..5ada4f2 --- /dev/null +++ b/tests/jwk-kty-ec-incorrect.scm @@ -0,0 +1,23 @@ +(use-modules (webid-oidc stubs) + (webid-oidc testing) + (webid-oidc errors)) + +(with-test-environment + "jwk-kty-ec-incorrect" + (lambda () + (let* ((key (json-string->scm "{ + \"kty\":\"EC\", + \"x\":\"This-point-does-not-exist-on-the-curve_____\", + \"y\":\"9VE4jf_Ok_o64zbTTlcuNJajHmt6v9TDVrU0CdvGRDA\", + \"crv\":\"P-256\" + }")) + (kty + (with-exception-handler + (lambda (exn) + #f) + (lambda () + (kty key)) + #:unwind? #t + #:unwind-for-type ¬-a-jwk))) + (when kty + (exit 1))))) -- cgit v1.2.3