overwrite sensitive prime with zeroes
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 18 Nov 2012 21:55:22 +0000 (22:55 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 18 Nov 2012 21:55:22 +0000 (22:55 +0100)
src/libstrongswan/plugins/gmp/gmp_rsa_private_key.c

index e860287..2c7097a 100644 (file)
@@ -185,7 +185,7 @@ static status_t compute_prime(size_t prime_size, bool safe, mpz_t *prime)
        while (((mpz_sizeinbase(*prime, 2) + 7) / 8) > prime_size);
 
        rng->destroy(rng);
-       mpz_clear(q);
+       mpz_clear_sensitive(q);
 
        return SUCCESS;
 }