Remove check for None in RsaPrivate.make_key().

The variable rsa is never None if it is successfully created.
Under all other circumstances an exception is raised which will skip the
execution of the remainder of this method.
pull/98/head
Robert de Vries 2026-04-09 20:12:42 +02:00
parent 4c1c578fbe
commit f03380a644
1 changed files with 0 additions and 2 deletions

View File

@ -829,8 +829,6 @@ if _lib.RSA_ENABLED:
Generates a new key pair of desired length **size**.
"""
rsa = cls(hash_type=hash_type)
if rsa is None: # pragma: no cover
raise WolfCryptError("Invalid key error (%d)" % ret)
ret = _lib.wc_MakeRsaKey(rsa.native_object, size, 65537,
rng.native_object)