summaryrefslogtreecommitdiff
path: root/aws
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-07-07 20:24:26 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-07-07 20:24:26 +0200
commitfc2c85b579bb56952ff751ce918170ed389b9651 (patch)
tree428e665ff99ea2eaa7c0316f2096347ba0a0f6a1 /aws
parent748cff67d89dab59799244d648598c1c8eafa223 (diff)
aws/request: make-operation->request: Define PAYLOAD-HASH.
* aws/request.scm (make-operation->request)[payload-hash]: New variable definition.
Diffstat (limited to 'aws')
-rw-r--r--aws/request.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/aws/request.scm b/aws/request.scm
index abaabb7..faa5e0d 100644
--- a/aws/request.scm
+++ b/aws/request.scm
@@ -154,6 +154,9 @@
(serialize-aws-value input))
"&"))
+ (define payload-hash
+ (hexify (sha256 (string->utf8 request-parameters))))
+
(define now (current-date 0))
(define amz-date
(date->string now "~Y~m~dT~H~M~SZ"))
@@ -202,8 +205,7 @@
canonical-querystring
canonical-headers
signed-headers
- ;; The payload hash
- (hexify (sha256 (string->utf8 request-parameters))))
+ payload-hash)
"\n"))
(credential-scope
(string-join (list date-stamp