summaryrefslogtreecommitdiff
path: root/src/analysis/db
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-04-25 18:22:02 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-04-25 18:22:02 (GMT)
commitc01cd3cb3784cecf54727bb037defe0b4f671c78 (patch)
tree8f22508c9e3263d2b0704230415191781d83243c /src/analysis/db
parente7652c0421672a7b13f4b659a48db7e96b334d17 (diff)
Applied the libssl official example completely to prevent a crash in some cases.
Diffstat (limited to 'src/analysis/db')
-rw-r--r--src/analysis/db/keymgn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/analysis/db/keymgn.c b/src/analysis/db/keymgn.c
index bce2ce8..42056f0 100644
--- a/src/analysis/db/keymgn.c
+++ b/src/analysis/db/keymgn.c
@@ -129,6 +129,8 @@ static bool generate_user_rsa_keys(const char *priv, const char *pub)
ret = EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, RSA_USED_SIZE * 8);
if (ret != 1) goto euhrk_exit;
+ pair = NULL;
+
ret = EVP_PKEY_keygen(ctx, &pair);
if (ret != 1) goto euhrk_exit;