title: SSLError: ("bad handshake: SysCallError(54, 'ECONNRESET')",)
body: <p>I am trying to fire a post request to the server using requests library. I am using the following stack:</p>
  
  <pre><code>appdirs==1.4.3
  asn1crypto==0.22.0
  boto==2.46.1
  certifi==2017.4.17
  cffi==1.10.0
  cryptography==1.8.1
  enum34==1.1.6
  idna==2.5
  inflection==0.3.1
  ipaddress==1.0.18
  ndg-httpsclient==0.4.2
  packaging==16.8
  pyasn1==0.2.3
  pycparser==2.17
  pyOpenSSL==17.0.0
  pyparsing==2.2.0
  qds-sdk==1.9.6
  requests==2.13.0
  six==1.10.0
  urllib3==1.21.1
  </code></pre>
  
  <p>But the requests always fails with the below error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/local/bin/qds.py", line 625, in &lt;module&gt;
  sys.exit(main())
    File "/usr/local/bin/qds.py", line 575, in main
  return cmdmain(a0, args)
    File "/usr/local/bin/qds.py", line 203, in cmdmain
  return globals()[action + "action"](cmdclass, args)
    File "/usr/local/bin/qds.py", line 138, in runaction
  cmd = cmdclass.run(**args)
    File "/usr/local/lib/python2.7/site-packages/qds_sdk/commands.py", line 96, in run
      cmd = cls.create(**kwargs)
    File "/usr/local/lib/python2.7/site-packages/qds_sdk/commands.py", line 77, in create
   return cls(conn.post(cls.rest_entity_path, data=kwargs))
    File "/usr/local/lib/python2.7/site-packages/qds_sdk/connection.py", line 59, in post
      return self._api_call("POST", path, data)
    File "/usr/local/lib/python2.7/site-packages/qds_sdk/connection.py", line 98, in _api_call
      return self._api_call_raw(req_type, path, data=data, params=params).json()
    File "/usr/local/lib/python2.7/site-packages/qds_sdk/connection.py", line 86, in _api_call_raw
      r = x.post(url, timeout=300, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 535, in post
      return self.request('POST', url, data=data, json=json, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
      resp = self.send(prep, **send_kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 609, in send
  r = adapter.send(request, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 497, in send
      raise SSLError(e, request=request)
    SSLError: ("bad handshake: SysCallError(54, 'ECONNRESET')",)
  </code></pre>
  
  <p>When I use open 0.9.8 to connect to server, the following error is given:</p>
  
  <pre><code>&gt; openssl s_client -connect &lt;ip&gt;:443
  CONNECTED(00000003)
  write:errno=54
  </code></pre>
  
  <p>But with a higher version on openssl the connection succeeds, I think that python is somehow using the lower version, but when I check ssl, it show the higher version:</p>
  
  <pre><code>&gt; python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
  OpenSSL 1.0.2k  26 Jan 2017
  </code></pre>
  
  <p>Not sure what is happening here. I am not sure how to format this, sorry for that.</p>