creds_ref['secret'] in s3/ec2 controller has type unicode.
and result type of six.b('AWS4' + secret) is an unicode.
but hmac.new decoder can't work with unicode strings - it
needs 'str' type in python 2.
So here simple change is needed - encode result string as 'utf-8'.
Same conversion we have in signature v1 checking.
Reviewed: https:/ /review. openstack. org/246844 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=bce8575c202 7fc9f9cd2c2a7ad 0cfc286df83c58
Committed: https:/
Submitter: Jenkins
Branch: master
commit bce8575c2027fc9 f9cd2c2a7ad0cfc 286df83c58
Author: Andrey Pavlov <email address hidden>
Date: Wed Nov 18 13:08:08 2015 +0300
Fix string conversion in s3 handler for python 2
creds_ ref['secret' ] in s3/ec2 controller has type unicode.
and result type of six.b('AWS4' + secret) is an unicode.
but hmac.new decoder can't work with unicode strings - it
needs 'str' type in python 2.
So here simple change is needed - encode result string as 'utf-8'.
Same conversion we have in signature v1 checking.
Also two comments from previous review was fixed.
Change-Id: I80d862956eace3 5753f00459d4915 0a62f07101a
Related-Bug: #1473042