title: How to disable OpenSSL version verification
body: <p>I'm using <a href="https://docker-py.readthedocs.io/en/latest/api/" rel="nofollow">docker-py</a> and <a href="https://github.com/d11wtq/dockerpty" rel="nofollow">dockerpty</a> to connect and execute commands in a container in <code>ucp</code>. Everything works correctly, except when I try to hijack the pseudo-terminal allocated in the container:</p>
  
  <pre><code>import docker
  import dockerpty
  import requests
  
  client = docker.Client()
  container = client.create_container(
       image='busybox:latest',
       stdin_open=True,
       tty=True,
       command='/bin/sh',
  )
  
  requests.packages.urllib3.disable_warnings()
  command = "/bin/bash"
  dockerpty.exec_command(client, container, command)
  </code></pre>
  
  <p>However, when I execute the command, I am able to connect with the remote terminal, but as I type in the terminal I get:</p>
  
  <pre><code>File "build/bdist.macosx-10.12-x86_64/egg/dockerpty/__init__.py", line 44, in exec_command
  
    File "build/bdist.macosx-10.12-x86_64/egg/dockerpty/pty.py", line 334, in start
  
    File "build/bdist.macosx-10.12-x86_64/egg/dockerpty/pty.py", line 373, in _hijack_tty
  
    File "build/bdist.macosx-10.12-x86_64/egg/dockerpty/io.py", line 367, in flush
  
    File "build/bdist.macosx-10.12-x86_64/egg/dockerpty/io.py", line 120, in read
  
    File "/usr/local/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 194, in recv
      data = self.connection.recv(*args, **kwargs)
    File "build/bdist.macosx-10.11-x86_64/egg/OpenSSL/SSL.py", line 1320, in recv
  
    File "build/bdist.macosx-10.11-x86_64/egg/OpenSSL/SSL.py", line 1187, in _raise_ssl_error
  
    File "build/bdist.macosx-10.11-x86_64/egg/OpenSSL/_util.py", line 48, in exception_from_error_queue
  OpenSSL.SSL.Error: [('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert protocol version')]
  </code></pre>
  
  <p>My <code>openssl</code> version is:</p>
  
  <pre><code>$ openssl version
  OpenSSL 1.0.2j  26 Sep 2016
  </code></pre>
  
  <p>while the container has:</p>
  
  <pre><code># openssl version
  OpenSSL 1.0.1t  3 May 2016
  </code></pre>
  
  <p>Well, both are above <code>1.0.1</code>. All of I need is to disable the version verification. With the <code>requests</code> library I could just to do:</p>
  
  <pre><code>import requests
  response = requests.get(&lt;https url&gt;, verify=False)
  </code></pre>
  
  <p>My <code>Python</code> version is <code>2.7.12</code> and <code>SSL</code>:</p>
  
  <pre><code>&gt;&gt;&gt; import ssl
  &gt;&gt;&gt; print ssl.OPENSSL_VERSION
  OpenSSL 1.0.2j  26 Sep 2016
  </code></pre>
  
  <p>is also up to date. The container has <code>Python 2.7.9</code> and <code>SSL</code>:</p>
  
  <pre><code>&gt;&gt;&gt; import ssl
  &gt;&gt;&gt; print ssl.OPENSSL_VERSION
  OpenSSL 1.0.1t  3 May 2016
  </code></pre>
  
  <p>I am about to create a fork from <code>dockerpty</code> and add the changes myself, unless someone has a better suggestion. What could I do to fix this issue?</p>