Skip to content

HTTPS certificate verification failed #19

Description

@JasonQSY

When we try to connect MTurk, i.e. type

./manage.py mtbalance

python shows that HTTPS certificate verification failed.

Fetching account balance...
Account balance:
Traceback (most recent call last):
  File "./manage.py", line 14, in <module>
    execute_from_command_line(sys.argv)
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/home/jason/Desktop/opensurfaces/server/mturk/management/commands/mtbalance.py", line 25, in handle
    print 'Account balance:', get_mturk_connection().get_account_balance()
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/boto-2.6.0.dev0-py2.7.egg/boto/mturk/connection.py", line 69, in get_account_balance
    ('OnHoldBalance', Price)])
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/boto-2.6.0.dev0-py2.7.egg/boto/mturk/connection.py", line 762, in _process_request
    response = self.make_request(request_type, params, verb='POST')
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/boto-2.6.0.dev0-py2.7.egg/boto/connection.py", line 952, in make_request
    return self._mexe(http_request)
  File "/home/jason/Desktop/opensurfaces/venv/local/lib/python2.7/site-packages/boto-2.6.0.dev0-py2.7.egg/boto/connection.py", line 872, in _mexe
    raise e
ssl.SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

It looks like python's the root certificate is too old for MTurk. I try to upgrade the certifi package by

pip install git+https://github.com/certifi/python-certifi --upgrade

But it does not solve the problem. One solution is just disable SSL verification for boto, but it is not secure for production. Anyone has some idea?

Related issues:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions