diff options
author | Jakub Jelen <jjelen@redhat.com> | 2019-06-21 08:55:06 +0200 |
---|---|---|
committer | Jakub Jelen <jjelen@redhat.com> | 2019-06-21 08:55:06 +0200 |
commit | a80547bdf99819d58bf8ca1f46d224a82b285ce3 (patch) | |
tree | 7ad953b54af7719a7b0eb152f07a78e66e4f24cc | |
parent | a4fa51454910f5d435e79248d5d0fd39703c4e28 (diff) | |
download | libssh-a80547bdf99819d58bf8ca1f46d224a82b285ce3.tar.gz libssh-a80547bdf99819d58bf8ca1f46d224a82b285ce3.tar.xz libssh-a80547bdf99819d58bf8ca1f46d224a82b285ce3.zip |
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>
-rw-r--r-- | src/pki_crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c index 4274bf5b..4cb23e60 100644 --- a/src/pki_crypto.c +++ b/src/pki_crypto.c @@ -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; } |