diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-21 20:14:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-21 20:14:00 +0000 |
commit | 21f542e9ab8c812534485e70a290991208d8b787 (patch) | |
tree | 5f64d49294ac56cc8a471819f1d208107bd9766f /src/util/crypto_ecc.c | |
parent | 59c2e2ae2391c2678ce54af52b19862b9d01a3fc (diff) | |
download | gnunet-21f542e9ab8c812534485e70a290991208d8b787.tar.gz gnunet-21f542e9ab8c812534485e70a290991208d8b787.zip |
clear private keys in static locations on exit
Diffstat (limited to 'src/util/crypto_ecc.c')
-rw-r--r-- | src/util/crypto_ecc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c index c17da46e9..defde904b 100644 --- a/src/util/crypto_ecc.c +++ b/src/util/crypto_ecc.c | |||
@@ -426,6 +426,19 @@ decode_public_sign_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pub) | |||
426 | 426 | ||
427 | 427 | ||
428 | /** | 428 | /** |
429 | * @ingroup crypto | ||
430 | * Clear memory that was used to store a private key. | ||
431 | * | ||
432 | * @param pk location of the key | ||
433 | */ | ||
434 | void | ||
435 | GNUNET_CRYPTO_ecc_key_clear (struct GNUNET_CRYPTO_EccPrivateKey *pk) | ||
436 | { | ||
437 | memset (pk, 0, sizeof (struct GNUNET_CRYPTO_EccPrivateKey); | ||
438 | } | ||
439 | |||
440 | |||
441 | /** | ||
429 | * Create a new private key. Caller must free return value. | 442 | * Create a new private key. Caller must free return value. |
430 | * | 443 | * |
431 | * @return fresh private key | 444 | * @return fresh private key |