I am following this example
http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html
and trying to reproduce the 64 character string for the signature which they state as...
aeeed9bbccd4d02ee5c0109b86d86835f995330da4c265957d157751f604d404
I have successful matched the hex digeset for the Canonical Request and positive that the StringToSign string is correct.
The last piece is calculating the signing_key and signature. This is where I am hitting a road block using the provided ruby function 'getSignatureKey'
http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html#signature-v4-examples-ruby
signing_key = getSignatureKey secret_access_key, current_date, region, aws_service
signature = OpenSSL::HMAC.digest('sha256', signing_key, string_to_sign)
def getSignatureKey key, dateStamp, regionName, serviceName
kDate = OpenSSL::HMAC.digest('sha256', "AWS4" + key, dateStamp)
kRegion = OpenSSL::HMAC.digest('sha256', kDate, regionName)
kService = OpenSSL::HMAC.digest('sha256', kRegion, serviceName)
kSigning = OpenSSL::HMAC.digest('sha256', kService, "aws4_request")
kSigning
end
The current output for 'signature' is this strange sequence of characters.
��ٻ���.�����h5��3 ��e�}wQ��
What am I missing to get the signature to equal...
aeeed9bbccd4d02ee5c0109b86d86835f995330da4c265957d157751f604d404