Python 2.3.4 (#2, Sep 24 2004, 08:39:09)
[GCC 3.3.4 (Debian 1:3.3.4-12)] on linux2
Type "help", "copyright", "credits" or "license" for
>>> from OpenSSL.crypto import *
>>> pk = PKey()
>>> pk.generate_key(TYPE_RSA, 1024)
>>> req = X509Req()
>>> req.sign(req.get_pubkey(), 'md5')
zsh: segmentation fault python
I understand now why this is invalid, I think: the
"pkey" object used does not have a private-key half.
However, it would be nice to have this represented in
the repr() and to have a less abrupt method of
informing the user that something has gone wrong.