From fc2c85b579bb56952ff751ce918170ed389b9651 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 7 Jul 2020 20:24:26 +0200 Subject: aws/request: make-operation->request: Define PAYLOAD-HASH. * aws/request.scm (make-operation->request)[payload-hash]: New variable definition. --- aws/request.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'aws/request.scm') 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 -- cgit v1.2.3