Skip to content

Commit

Permalink
Replace deprecated generate_rsa_key() with generate_rsa_key_ex().
Browse files Browse the repository at this point in the history
  • Loading branch information
killing committed Nov 21, 2017
1 parent 10feb60 commit 3a547b8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/utils/rsa.cpp
Expand Up @@ -177,8 +177,12 @@ id_from_pubkey (RSA *pubkey)
RSA *
generate_private_key(u_int bits)
{
RSA *priv = NULL;
RSA *priv = RSA_new ();
BIGNUM *e = BN_new ();

priv = RSA_generate_key(bits, 35, NULL, NULL);
return priv;
BN_set_word (e, 35);
RSA_generate_key_ex (priv, bits, e, NULL);

BN_free (e);
return priv;
}

1 comment on commit 3a547b8

@moschlar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@killing So there isn't as much code needed as proposed in #940 ?

Please sign in to comment.