check_key segfault
Paul Washburn <[email protected]> Fri, 10 Apr 2009 09:49:26 -0600
| Newsgroups | gmane.comp.python.cryptography |
|---|---|
| Message-ID | <[email protected]> |
--000e0cd150b62deece0467354f1f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hello all,
Using nearly the same code as the test_x509_public_encrypt unit test in
tests/test_rsa.py, and the recipient.pem from the same folder, I get a
segfault when calling check_key() on the RSA object returned by
x509.get_pubkey().get_rsa(). The test code to reproduce is as follows:
from M2Crypto import X509, RSA
x509 = X509.load_cert("certs/recipient.pem")
rsa = x509.get_pubkey().get_rsa()
rsa.save_pub_key('certs/pubkey.pem')
print "key saved"
rsa.check_key()
print "checked"
rsa.public_encrypt("data", RSA.pkcs1_padding)
print "encrypted"
Which produces the following:
key saved
Segmentation fault
I'm using the python-m2crypto package, version 0.18.2-2, from the Ubuntu
repos, along with openssl version 0.9.8g-10.1ubuntu2.2
Any help would be greatly appreciated!
--
Paul
[email protected]
--000e0cd150b62deece0467354f1f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello all,<br><br>Using nearly the same code as the test_x509_public_encryp=
t unit test in tests/test_rsa.py, and the recipient.pem from the same folde=
r, I get a segfault when calling check_key() on the RSA object returned by =
x509.get_pubkey().get_rsa(). The test code to reproduce is as follows:<br>
<br>from M2Crypto import X509, RSA<br><br>x509 =3D X509.load_cert("cer=
ts/recipient.pem")<br>rsa =3D x509.get_pubkey().get_rsa()<br>rsa.save_=
pub_key('certs/pubkey.pem')<br>print "key saved"<br>rsa.c=
heck_key()<br>
print "checked"<br>rsa.public_encrypt("data", RSA.pkcs1=
_padding)<br>print "encrypted"<br><br>Which produces the followin=
g:<br><br>key saved<br>Segmentation fault<br><br>I'm using the python-m=
2crypto package, version 0.18.2-2, from the Ubuntu repos, along with openss=
l version 0.9.8g-10.1ubuntu2.2<br>
<br>Any help would be greatly appreciated!<br clear=3D"all"><br>-- <br>Paul=
<br><a href=3D"mailto:[email protected]">[email protected]</a> <br>
--000e0cd150b62deece0467354f1f--