title: Python httplib SSL23_GET_SERVER_HELLO:unknown protocol
body: <p>Note: this code works fine on Ubuntu but not on mac and instead of changing the mac/python settings locally I'm trying to make change to the code so it'll work everywhere..</p>
  
  <pre><code>import ssl 
  import httplib 
  httplib.HTTPConnection(server, port, timeout)
  </code></pre>
  
  <p>but it throws error:</p>
  
  <blockquote>
    <p>[Errno 1] _ssl.c:503: error:140770FC:SSL
    routines:SSL23_GET_SERVER_HELLO:unknown protocol</p>
  </blockquote>
  
  <p>now code's not using <strong><em>urllib.request</em></strong> instead using <strong><em>httplib</em></strong></p>
  
  <p>I want to change the code so it'll take SSLv3 as default protocol, something like this:</p>
  
  <pre><code>ssl.SSLContext(ssl.PROTOCOL_SSLv3)
  </code></pre>
  
  <p>I looked around and found few links but nothing is working!</p>
  
  <p><a href="http://scanf.info/post/37833206412/sslv3-alert-handshake-failure-on-ubuntu-12-04" rel="noreferrer">this link is for ubuntu</a></p>
  
  <p><a href="http://carnivore.it/2011/10/07/error_14077458_ssl_routines_ssl23_get_server_hello_reason_1112#blogtng__comment_form" rel="noreferrer">link for python urllib and cURL</a></p>
  
  <p><a href="http://bugs.python.org/issue11220" rel="noreferrer">python bug fix, but again for urllib</a></p>