cperciva / bsdec2-image-upload

Automatically exported from code.google.com/p/bsdec2-image-upload
Other
23 stars 11 forks source link

fix region upload #8

Closed natpicone closed 5 years ago

natpicone commented 5 years ago

This will fix non eu-west region upload, tested with eu-central-1. Upload bucket MUST match AMI region.

cperciva commented 5 years ago

I'm not sure I understand this. Amazon has s3-REGION.amazonaws.com as a CNAME for s3.REGION.amazonaws.com. What goes wrong with the existing code?

natpicone commented 5 years ago

Yes, it's a CNAME however current code fails to match the certificate alt names, so the upload just fails. This is the quickest patch to make it work. This fix should help you resolve #4

This is an example of the current certificate names:

*  subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=*.s3.eu-central-1.amazonaws.com
*  subjectAltName: host "xxx.s3-eu-central-1.amazonaws.com" matched cert's "*.s3-eu-central-1.amazonaws.com"
cperciva commented 5 years ago

Aha, got it. Thanks!