I am using haxe's Http class (compiled to php) to send a request() over https to AWS. Here a minimal example using the haxe-aws library (http://ift.tt/1jTtL3J):
var iamconf = new IAMConfig('newbucket.s3-eu-central-1.amazonaws.com', accessKey, secretKey, 'eu-central-1', 's3');
var sig4 = new Sig4Http('http://ift.tt/1LtNe0U', iamconf);
sig4.applySigning(true);
sig4.setPostData('<CreateBucketConfiguration xmlns="http://ift.tt/1f8lKAh"><LocationConstraint>eu-central-1</LocationConstraint></CreateBucketConfiguration>');
sig4.request(true);
No matter which service/endpoint I use, the response is always:
stream_socket_client(): Peer certificate CN=`*.s3.eu-central-1.amazonaws.com' did not match expected CN=`54.231.192.50' (errno: 2) in [...]lib\sys\net\Socket.class.php at line #34
Requests over http work. Any ideas?
Aucun commentaire:
Enregistrer un commentaire