Fixes certificate mismatch error on ec2.us-east-1.amazonaws.com#2
Open
danpopp wants to merge 2 commits intoepheph:masterfrom
Open
Fixes certificate mismatch error on ec2.us-east-1.amazonaws.com#2danpopp wants to merge 2 commits intoepheph:masterfrom
danpopp wants to merge 2 commits intoepheph:masterfrom
Conversation
This fixes the invalid certificate issue caused by incorrect URL subdomain. Since Amazon's SSL/TLS certificate is for https://ec2.<REGION-URL>.amazonaws.com and not https://<REGION-URL>.ec2.amazonaws.org (error output below). Traceback (most recent call last): File "../../fec2-din.py", line 95, in <module> reservations = ec2_conn.get_all_instances() File "/Library/Python/2.7/site-packages/boto/ec2/connection.py", line 575, in get_all_instances max_results=max_results) File "/Library/Python/2.7/site-packages/boto/ec2/connection.py", line 656, in get_all_reservations [('item', Reservation)], verb='POST') File "/Library/Python/2.7/site-packages/boto/connection.py", line 1127, in get_list response = self.make_request(action, params, path, verb) File "/Library/Python/2.7/site-packages/boto/connection.py", line 1073, in make_request return self._mexe(http_request) File "/Library/Python/2.7/site-packages/boto/connection.py", line 910, in _mexe request.body, request.headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 955, in request self._send_request(method, url, body, headers) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 989, in _send_request self.endheaders(body) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 951, in endheaders self._send_output(message_body) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 811, in _send_output self.send(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 773, in send self.connect() File "/Library/Python/2.7/site-packages/boto/https_connection.py", line 124, in connect 'certificate' % hostname) boto.https_connection.InvalidCertificateException: Host us-east-1.ec2.amazonaws.com returned an invalid certificate (remote hostname "us-east-1.ec2.amazonaws.com" does not match certificate): {'notAfter': 'Sep 17 23:59:59 2014 GMT', 'subject': ((('countryName', u'US'),), (('stateOrProvinceName', u'Washington'),), (('localityName', u'Seattle'),), (('organizationN ame', u'Amazon.com Inc.'),), (('commonName', u'ec2.us-east-1.amazonaws.com'),))}
For detailed description see: commit 69c9944
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See commit 69c9944 for complete detailed information about this error.