tlslite.utils.openssl_rsakey module¶
OpenSSL/M2Crypto RSA implementation.
-
class
tlslite.utils.openssl_rsakey.
OpenSSL_RSAKey
(n=0, e=0, key_type='rsa')¶ Bases:
tlslite.utils.rsakey.RSAKey
-
__del__
()¶
-
__getattr__
(name)¶
-
__init__
(n=0, e=0, key_type='rsa')¶ Create a new RSA key.
If n and e are passed in, the new key will be initialized.
Parameters: - n (int) – RSA modulus.
- e (int) – RSA public exponent.
- key_type (str) – type of the RSA key, “rsa” for rsaEncryption (universal, able to perform all operations) or “rsa-pss” for a RSASSA-PSS key (able to perform only RSA-PSS signature verification and creation)
-
__module__
= 'tlslite.utils.openssl_rsakey'¶
-
acceptsPassword
()¶ Return True if the write() method accepts a password for use in encrypting the private key.
Return type: bool
-
static
generate
(bits, key_type='rsa')¶
-
hasPrivateKey
()¶ Return whether or not this key has a private component.
Return type: bool
-
static
parse
(s, passwordCallback=None)¶
-
write
(password=None)¶ Return a string containing the key.
Return type: str Returns: A string describing the key, in whichever format (PEM) is native to the implementation.
-
-
tlslite.utils.openssl_rsakey.
password_callback
(v, prompt1='Enter private key passphrase:', prompt2='Verify passphrase:')¶