title: Error when installing cryptography python library with pip in Centos
body: <p>I'm trying to install the cryptography python library using pip (so I can use paramiko), but I'm getting a gcc error.</p>
  
  <p>Some background: this is on a CentOS 5.11 VM that I was given with Python 2.4.3 installed. I installed Python 2.7.12 alongside it, and had to struggle a little bit to get all the dependencies for cryptography installed.</p>
  
  <p>When I run the command</p>
  
  <pre><code>sudo pip2.7 install cryptography
  </code></pre>
  
  <p>I first get an SNIMissingWarning error (which I think is tangential, but I'll give details at the end of the question, in case it's not). Then I get several hundred lines of install logs, finally ending with:</p>
  
  <blockquote>
    <p>build/temp.linux-i686-2.7/_openssl.c:72077: error: storage class specified for parameter ‘_cffi_type_context’</p>
    
    <p>build/temp.linux-i686-2.7/_openssl.c:72077: error: parameter ‘_cffi_type_context’ is initialized</p>
    
    <p>build/temp.linux-i686-2.7/_openssl.c:72120: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘<strong>attribute</strong>’ before ‘{’ token</p>
    
    <p>build/temp.linux-i686-2.7/_openssl.c:72122: error: old-style parameter declarations in prototyped function definition</p>
    
    <p>build/temp.linux-i686-2.7/_openssl.c:591: error: parameter name omitted</p>
    
    <p>build/temp.linux-i686-2.7/_openssl.c:72122: error: expected ‘{’ at end of input</p>
    
    <p>error: command 'gcc' failed with exit status 1</p>
    
    <hr>
    
    <p>Command "/usr/local/bin/python2.7 -u -c "import setuptools, tokenize;<strong>file</strong>='/tmp/pip-build-RGpvd5/cryptography/setup.py';f=getattr(tokenize, 'open', open)(<strong>file</strong>);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, <strong>file</strong>, 'exec'))" install --record /tmp/pip-kwpB5q-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-RGpvd5/cryptography/</p>
  </blockquote>
  
  <p>Since it's a gcc error, I'm not sure what to do. I looked for information about it, but I don't know much about C, so the answers didn't mean much to me. I couldn't find anything relating to installing cryptography for python discussing this specific error.</p>
  
  <p>Any ideas what may be happening?</p>
  
  <hr>
  
  <p>In more detail, the SNIMissingWarning message I get is:</p>
  
  <blockquote>
    <p>/usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/<em>vendor/requests/packages/urllib3/util/ssl</em>.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see <a href="https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning" rel="nofollow noreferrer">https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning</a>.</p>
    
    <p>SNIMissingWarning</p>
    
    <p>Using cached cryptography-1.6.tar.gz</p>
  </blockquote>
  
  <p>The readthedocs.io link has this to say about the error: "This happens on Python 2 versions older than 2.7.9. These older versions lack SNI support." Since I am using 2.7.12, hopefully that's not a problem. It further suggests installing urllib3 with the secure option, which I tried, using</p>
  
  <pre><code>pip2.7 install urllib3[secure]
  </code></pre>
  
  <p>This automatically attempted to install cryptography, and that failed with a gcc error, the same way as before.</p>