summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-07-06 13:25:18 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-07-06 13:25:18 +0200
commit67fc110e8c35e747768d88d12958badd444bcd20 (patch)
treedc6941a7506d6d5297cf0b219123cb2059cfbfff /src
parent366cc89e8ccaf519d973c507b8534f5527141d84 (diff)
Fix the semantic of dpop signature time errors
Diffstat (limited to 'src')
-rw-r--r--src/scm/webid-oidc/errors.scm20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/scm/webid-oidc/errors.scm b/src/scm/webid-oidc/errors.scm
index 6cd337a..d494c7d 100644
--- a/src/scm/webid-oidc/errors.scm
+++ b/src/scm/webid-oidc/errors.scm
@@ -510,7 +510,7 @@
(make-exception-type
'&dpop-signed-in-future
&external-error
- '(signed requested)))
+ '(signed current)))
(define (the-date object)
(when (integer? object)
@@ -519,19 +519,19 @@
(set! object (time-utc->date object)))
object)
-(define-public (raise-dpop-signed-in-future signed requested)
+(define-public (raise-dpop-signed-in-future signed current)
(raise-exception
- ((record-constructor &dpop-signed-in-future) (the-date signed) (the-date requested))))
+ ((record-constructor &dpop-signed-in-future) (the-date signed) (the-date current))))
(define-public &dpop-too-old
(make-exception-type
'&dpop-too-old
&external-error
- '(signed requested)))
+ '(signed current)))
-(define-public (raise-dpop-too-old signed requested)
+(define-public (raise-dpop-too-old signed current)
(raise-exception
- ((record-constructor &dpop-too-old) (the-date signed) (the-date requested))))
+ ((record-constructor &dpop-too-old) (the-date signed) (the-date current))))
(define-public &dpop-unconfirmed-key
(make-exception-type
@@ -1271,12 +1271,12 @@
(uri->string (get 'signed)) (uri->string (get 'requested))))
((&dpop-signed-in-future)
(format #f (G_ "the date is ~a, but the DPoP proof is signed in the future at ~a")
- (time-second (date->time-utc (get 'signed)))
- (time-second (date->time-utc (get 'requested)))))
+ (time-second (date->time-utc (get 'current)))
+ (time-second (date->time-utc (get 'signed)))))
((&dpop-too-old)
(format #f (G_ "the date is ~a, but the DPoP proof was signed too long ago at ~a")
- (time-second (date->time-utc (get 'signed)))
- (time-second (date->time-utc (get 'requested)))))
+ (time-second (date->time-utc (get 'current)))
+ (time-second (date->time-utc (get 'signed)))))
((&dpop-unconfirmed-key)
(let ((key (get 'key))
(expected (get 'expected))