3.1.5 PKey objects
The PKey object has the following methods:
Return the number of bits of the key.
- generate_key(type, bits)
Generate a public/private key pair of the type type (one of
TYPE_RSA and TYPE_DSA) with the size bits.
Return the type of the key.
Check the consistency of this key, returning True if it is consistent and
raising an exception otherwise. This is only valid for RSA keys. See the
OpenSSL RSA_check_key man page for further limitations.