summaryrefslogtreecommitdiff
path: root/tests/jwk-kty-rsa-incorrect.scm
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2020-01-01 00:00:00 +0100
committerVivien Kraus <vivien@planete-kraus.eu>2021-05-11 00:14:28 +0200
commitc1940e2d9c926374e581cef7b47082b62e76f4ca (patch)
treedb6a22fd99531d8926fffa3bfc3601e5c237be13 /tests/jwk-kty-rsa-incorrect.scm
parent6de5a9f532241218181219b44687217e718461ce (diff)
Add a strip function
Diffstat (limited to 'tests/jwk-kty-rsa-incorrect.scm')
-rw-r--r--tests/jwk-kty-rsa-incorrect.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/jwk-kty-rsa-incorrect.scm b/tests/jwk-kty-rsa-incorrect.scm
new file mode 100644
index 0000000..11ab368
--- /dev/null
+++ b/tests/jwk-kty-rsa-incorrect.scm
@@ -0,0 +1,18 @@
+(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\":\"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 &not-a-jwk)))
+ (when kty
+ (exit 1)))))