summaryrefslogtreecommitdiff
path: root/tests/jwk-kty-ec-incorrect.scm
blob: 5ada4f2dda4efb81a2d35be064c710ede2864184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 &not-a-jwk)))
     (when kty
       (exit 1)))))