mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
pki_crypto: Correct error checking after RSA key generation
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@@ -529,7 +529,7 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
|
|||||||
|
|
||||||
BN_free(e);
|
BN_free(e);
|
||||||
|
|
||||||
if (rc == -1 || key->rsa == NULL)
|
if (rc <= 0 || key->rsa == NULL)
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
return SSH_OK;
|
return SSH_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user