From 79b8aa19851524b98d046f74a7338fea7f0aba69 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 7 Dec 2005 07:27:28 +0000 Subject: - fixed gmp initialization bugs - fixed spi check bug in ike_sa_init_requested --- Source/charon/transforms/rsa/rsa_private_key.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Source/charon/transforms/rsa/rsa_private_key.c') diff --git a/Source/charon/transforms/rsa/rsa_private_key.c b/Source/charon/transforms/rsa/rsa_private_key.c index 60673d746..c5614324b 100644 --- a/Source/charon/transforms/rsa/rsa_private_key.c +++ b/Source/charon/transforms/rsa/rsa_private_key.c @@ -279,6 +279,15 @@ static status_t set_key(private_rsa_private_key_t *this, chunk_t key) exp2.ptr = key.ptr + this->k * 6; coeff.ptr = key.ptr + this->k * 7; + mpz_init(this->n); + mpz_init(this->e); + mpz_init(this->p); + mpz_init(this->q); + mpz_init(this->d); + mpz_init(this->exp1); + mpz_init(this->exp2); + mpz_init(this->coeff); + mpz_import(this->n, this->k, 1, 1, 1, 0, n.ptr); mpz_import(this->e, this->k, 1, 1, 1, 0, e.ptr); mpz_import(this->p, this->k, 1, 1, 1, 0, p.ptr); -- cgit v1.2.3