diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2021-08-09 18:46:48 +0200 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-08-13 01:06:38 +0200 |
commit | ded10e28782f289ad3db15320bcf619ab4336876 (patch) | |
tree | 32609fd9f1eb0d2f8a23105e09f193827d16a275 /tests/dpop-proof-iat-too-late.scm | |
parent | 7b62790238902e10edb83c07286cf0643b097997 (diff) |
Switch to a more sensible error reporting system
Diffstat (limited to 'tests/dpop-proof-iat-too-late.scm')
-rw-r--r-- | tests/dpop-proof-iat-too-late.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/dpop-proof-iat-too-late.scm b/tests/dpop-proof-iat-too-late.scm index 0e1f4ed..7cf2146 100644 --- a/tests/dpop-proof-iat-too-late.scm +++ b/tests/dpop-proof-iat-too-late.scm @@ -1,4 +1,4 @@ -;; webid-oidc, implementation of the Solid specification +;; disfluid, implementation of the Solid specification ;; Copyright (C) 2020, 2021 Vivien Kraus ;; This program is free software: you can redistribute it and/or modify @@ -17,6 +17,7 @@ (use-modules (webid-oidc dpop-proof) (webid-oidc jti) (webid-oidc jwk) + (webid-oidc jws) (webid-oidc testing) ((webid-oidc parameters) #:prefix p:) (webid-oidc errors) @@ -38,8 +39,11 @@ #:htu (string->uri "https://example.com/res#frag")))) (with-exception-handler (lambda (error) - (unless ((record-predicate &dpop-too-old) - ((record-accessor &cannot-decode-dpop-proof 'cause) error)) + (unless (and (expired? error) + (eqv? (time-second (date->time-utc (error-expiration-date error))) + 120) + (eqv? (time-second (date->time-utc (error-current-date error))) + 600)) (raise-exception error))) (lambda () (parameterize ((p:current-date 600)) @@ -49,4 +53,4 @@ cnf)) (exit 2)) #:unwind? #t - #:unwind-for-type &cannot-decode-dpop-proof))) + #:unwind-for-type &expired))) |