Skip to content

Commit f03380a

Browse files
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.
1 parent 4c1c578 commit f03380a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

wolfcrypt/ciphers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,6 @@ def make_key(cls, size, rng=Random(), hash_type=None):
829829
Generates a new key pair of desired length **size**.
830830
"""
831831
rsa = cls(hash_type=hash_type)
832-
if rsa is None: # pragma: no cover
833-
raise WolfCryptError("Invalid key error (%d)" % ret)
834832

835833
ret = _lib.wc_MakeRsaKey(rsa.native_object, size, 65537,
836834
rng.native_object)

0 commit comments

Comments
 (0)