diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-04-01 17:49:45 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-04-01 17:49:45 +0000 |
commit | e5cadaf8db8cd0b43edaeaf7223aeffb4450a9ab (patch) | |
tree | 357856da9278da6922643027dd0ec3c36416e31b /fips/rand/fips_drbg_selftest.c | |
parent | 8cf88778ea1fe21bcbb16be778c79e418a3fbdd0 (diff) |
Only zeroise sensitive parts of DRBG context, so the type and flags
are undisturbed.
Allow setting of "rand" callbacks for DRBG.
Diffstat (limited to 'fips/rand/fips_drbg_selftest.c')
-rw-r--r-- | fips/rand/fips_drbg_selftest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fips/rand/fips_drbg_selftest.c b/fips/rand/fips_drbg_selftest.c index c46fe58521..d1f9dd118b 100644 --- a/fips/rand/fips_drbg_selftest.c +++ b/fips/rand/fips_drbg_selftest.c @@ -954,11 +954,11 @@ static int fips_drbg_health_check(DRBG_CTX *dctx, DRBG_SELFTEST_DATA *td) } FIPS_drbg_uninstantiate(dctx); - p = (unsigned char *)dctx; + p = (unsigned char *)&dctx->d; /* Standard says we have to check uninstantiate really zeroes * the data... */ - for (i = 0; i < sizeof(DRBG_CTX); i++) + for (i = 0; i < sizeof(dctx->d); i++) { if (*p != 0) { @@ -980,7 +980,7 @@ static int fips_drbg_health_check(DRBG_CTX *dctx, DRBG_SELFTEST_DATA *td) return 0; } - + int fips_drbg_kat(DRBG_CTX *dctx, int nid, unsigned int flags) { |