Check return value of RSA_generate_key_ex().
authorGuus Sliepen <guus@tinc-vpn.org>
Wed, 22 Jun 2016 15:42:13 +0000 (17:42 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Wed, 22 Jun 2016 15:42:13 +0000 (17:42 +0200)
src/tincd.c

index ccd79dc..aaf40e2 100644 (file)
@@ -411,7 +411,7 @@ static bool keygen(int bits) {
        BN_free(e);
        BN_GENCB_free(cb);
 
-       if(!rsa_key) {
+       if(!result) {
                fprintf(stderr, "Error during key generation!\n");
                return false;
        } else