Skip to content

Commit

Permalink
use correct modulus and exponent in rdssl_rkey_get_exp_mod
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Beth committed Dec 2, 2019
1 parent 50f607e commit 53ba87d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssl.c
Expand Up @@ -307,10 +307,10 @@ rdssl_rkey_get_exp_mod(RDSSL_RKEY * rkey, uint8 * exponent, uint32 max_exp_len,
{
size_t outlen;

outlen = (mpz_sizeinbase(modulus, 2) + 7) / 8;
outlen = (mpz_sizeinbase(rkey->n, 2) + 7) / 8;
if (outlen > max_mod_len)
return 1;
outlen = (mpz_sizeinbase(exponent, 2) + 7) / 8;
outlen = (mpz_sizeinbase(rkey->e, 2) + 7) / 8;
if (outlen > max_exp_len)
return 1;

Expand Down

0 comments on commit 53ba87d

Please sign in to comment.