timkay / aws

Easy command line access to Amazon EC2, S3, SQS, ELB, and SDB
http://timkay.com/aws/
426 stars 125 forks source link

S3 certificate error with bucket names containing a dot. #5

Closed babo closed 12 years ago

babo commented 13 years ago

s3 commands from aws failed on AWS Linux, running it in verbose mode the following curl problem occurred: SSL: certificate subject name '*.s3.amazonaws.com' does not match target host name 'mybucket.mydomain.com.s3.amazonaws.com'

The problem caused by the no_vhost variable which was undef by default, at line 1831 the if(!$no_vhost) was true and the vhost has been redifined.

timkay commented 13 years ago

I don't understand your error report. Can you please give an example command that fails?

timkay commented 13 years ago

The --no-vhost option is supposed to tell aws to not use vhost addressing. Normally you want to use vhost addressing, because it's more efficient. Your change turns off vhost by default and has --no-vhost turn it back on, which doesn't make sense.

Please provide an example of the problem you are having, so that we can get to the root cause.

timkay commented 13 years ago

Note that it works fine for me:

$ aws ls -l data.boopsie.com
-rw-------  1 timkay681      11749 2011-02-04 22:14:58 astaro.png

This example used the vhost syntax:

https://data.boopsie.com.s3.amazonaws.com/?AWS ...
jmjumps commented 13 years ago

I have this same issue on the Amazon Linux AMI, but not the Ubuntu AMI. Using --no-vhost avoids the issue. According to comment 3 on [http://code.google.com/p/s3fs/issues/detail?id=128]() it appears the difference is with what libraries curl is compiled against on the different platforms.

timkay commented 12 years ago

As jmjumps pointed out, it's a bug in curl. The pull request proposes to turn off vhosts by default. I am going to decline that change because most people don't have a problem, and it's better addressed by fixing curl.