Use _hmac and _base64 functions instead of openssl and base64 binaries

This commit is contained in:
raven-kg 2019-05-22 09:38:02 +06:00
parent efedc607b2
commit 7e52ba31ef

View File

@ -58,7 +58,7 @@ ses_send() {
_saveaccountconf_mutable AWS_SES_FROM "$AWS_SES_FROM"
_date="$(date -R)"
_signature="$(echo -n "$_date" | ${ACME_OPENSSL_BIN:-openssl} dgst -sha256 -hmac "$AWS_SECRET_KEY" -binary | base64 -w 0)"
_signature="$(printf "%s" "$_date" | _hmac sha256 $AWS_SECRET_KEY | _base64)"
_endpoint="https://email.$AWS_REGION.amazonaws.com"
export _H1="X-Amzn-Authorization: AWS3-HTTPS AWSAccessKeyId=$AWS_ACCESS_KEY, Algorithm=HmacSHA256, Signature=$_signature"