title: python ssl ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:590)
body: <p>I get this error when using python 2.7.10 or 2.7.9 but works with python 2.7.6 (haven't tested other versions)</p>
  
  <p>OpenSLL version:</p>
  
  <pre><code>openssl version -a
  OpenSSL 1.0.1f 6 Jan 2014
  built on: Thu Jun 11 15:30:15 UTC 2015
  platform: debian-amd64
  options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
  compiler: cc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
  OPENSSLDIR: "/usr/lib/ssl"
  </code></pre>
  
  <p>Python:</p>
  
  <pre><code>import ssl
  print ssl.OPENSSL_VERSION_NUMBER
  268439663L
  print get_server_certificate(('someInternalIp', 443), ssl_version=ssl.PROTOCOL_SSLv23)
  </code></pre>
  
  <p>StackTrace:</p>
  
  <pre><code>File "C:\Python27\lib\ssl.py", line 985, in get_server_certificate
    with closing(context.wrap_socket(sock)) as sslsock:
  File "C:\Python27\lib\ssl.py", line 352, in wrap_socket
    _context=self)
  File "C:\Python27\lib\ssl.py", line 579, in __init__
    self.do_handshake()
  File "C:\Python27\lib\ssl.py", line 808, in do_handshake
    self._sslobj.do_handshake()
  ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:590)
  </code></pre>