X509 object has no attribute get_signature_algorithm

Asked by dranitou

Hi,

After having loaded a certificate, I'm trying to get the signature algorithm, as documented here : http://packages.python.org/pyOpenSSL/openssl-x509.html. But I get an AttributeError: 'X509' object has no attribute 'get_signature_algorithm'. I don't know what to do, as I can access all the others fields of the certificate.

Do you have any idea how to fix this? Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
pyOpenSSL Edit question
Assignee:
No assignee Edit question
Solved by:
Jean-Paul Calderone
Solved:
Last query:
Last reply:
Revision history for this message
Jean-Paul Calderone (exarkun) said :
#1

Make sure you have pyOpenSSL 0.13, the version in which this method was introduced (and the latest release).

Revision history for this message
dranitou (paulbottinelli) said :
#2

Thanks, I didn't have the lates version!

 I just downloaded it, and when trying to build it on Ubuntu 12.04 with python setup.py build, I get this error :
OpenSSL/crypto/crypto.c:14:20: fatal error: Python.h: No such file or directory
compilation failed.

Do you have any idea how to fix this?

Revision history for this message
dranitou (paulbottinelli) said :
#3

Thanks, I didn't have the lates version!

 I just downloaded it, and when trying to build it on Ubuntu 12.04 with python setup.py build, I get this error :
OpenSSL/crypto/crypto.c:14:20: fatal error: Python.h: No such file or directory
compilation failed.

Do you have any idea how to fix this?

Revision history for this message
dranitou (paulbottinelli) said :
#4

Sorry for the double post..

Revision history for this message
Best Jean-Paul Calderone (exarkun) said :
#5

You're missing the build dependencies. Try "apt-get build-dep python-openssl". Also, note that there are many, many, many helpful google hits for "fatal error: Python.h: No such file or directory".

Revision history for this message
dranitou (paulbottinelli) said :
#6

Thanks Jean-Paul Calderone, that solved my question.