title: How can I force python apns-client to avoid using SSL 3?
body: <p>A vulnerability was recently found in SSL 3, and Apple decided to turn it off for push notifications (APNS).  Here is <a href="https://developer.apple.com/news/?id=10222014a" rel="nofollow">the announcement</a> published on Oct 22, 2014.</p>
  
  <p>For the last few days, my development push server has been crashing with this exception:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/var/django/current/manage.py", line 12, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/var/django/shared/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
      utility.execute()
    File "/var/django/shared/env/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 "/var/django/shared/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
      self.execute(*args, **options.__dict__)
    File "/var/django/shared/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
      output = self.handle(*args, **options)
    File "/var/django/releases/7f093a6773161ea21d18c502eaf1a38c76749314/my_app/management/commands/load_apns_feedback.py", line 35, in handle
      for ios_push_notification_hex_token, unavailability_detected_at in feedback_service.feedback():
    File "/var/django/shared/env/local/lib/python2.7/site-packages/apnsclient/apns.py", line 696, in feedback
      self._connection.refresh()
    File "/var/django/shared/env/local/lib/python2.7/site-packages/apnsclient/apns.py", line 269, in refresh
      self._ensure_socket_open()
    File "/var/django/shared/env/local/lib/python2.7/site-packages/apnsclient/apns.py", line 262, in _ensure_socket_open
      self._connect_and_handshake()
    File "/var/django/shared/env/local/lib/python2.7/site-packages/apnsclient/apns.py", line 252, in _connect_and_handshake
      self._connection.do_handshake()
    File "/var/django/shared/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 1076, in do_handshake
      self._raise_ssl_error(self._ssl, result)
    File "/var/django/shared/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 871, in _raise_ssl_error
      _raise_current_error()
    File "/var/django/shared/env/local/lib/python2.7/site-packages/OpenSSL/_util.py", line 22, in exception_from_error_queue
      raise exceptionType(errors)
  OpenSSL.SSL.Error: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3 alert handshake failure')]
  </code></pre>
  
  <p>How can I fix this?  Is there a way to tell apns-client to avoid SSL 3 and use TLS instead?</p>