1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +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:
Jakub Jelen
2019-06-21 08:55:06 +02:00
parent a4fa514549
commit a80547bdf9

View File

@@ -529,7 +529,7 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
BN_free(e);
if (rc == -1 || key->rsa == NULL)
if (rc <= 0 || key->rsa == NULL)
return SSH_ERROR;
return SSH_OK;
}