有人可以帮我计算bash中的AWS_SIGNATURE
这是我要尝试的GET:
curl -k \
-X GET \
-H "Host: ${AWS_BUCKET_NAME}.s3.eu-west-1.amazonaws.com" \
-H "Date: Tue, 27 Nov 2018 11:20:00 +0200" \
-H "Authorization: AWS ${AWS_ACCESS_KEY_ID}:${AWS_SIGNATURE}" \
"https://s3.eu-west-1.amazonaws.com/${AWS_BUCKET_NAME}/?list-type=2"
答案 0 :(得分:0)
您需要安装openssl和base64编码器才能创建签名。
假设您为每个$ variables提供值
Signature=`echo -n $StringToSign | openssl sha1 -hmac $YourSecretAccessKeyID | base64`