From: Martin Willi Date: Thu, 29 Apr 2010 07:51:37 +0000 (+0200) Subject: Fixed RSA key generation with gcrypt X-Git-Tag: 4.4.0~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eadbc3da2fb47a1b095f269a49889eab329e735e;p=thirdparty%2Fstrongswan.git Fixed RSA key generation with gcrypt --- diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c index a1d237bcdc..2cb13c5f3e 100644 --- a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c +++ b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c @@ -342,7 +342,7 @@ static bool get_encoding(private_gcrypt_rsa_private_key_t *this, gcry_mpi_sub_ui(q, q, 1); exp2 = gcry_mpi_new(gcry_pk_get_nbits(this->key)); - gcry_mpi_mod(exp1, d, q); + gcry_mpi_mod(exp2, d, q); gcry_mpi_release(q); err = gcry_mpi_aprint(GCRYMPI_FMT_USG, &cexp1.ptr, &cexp1.len, exp1)