2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

[rt31459d] rebased rt31459c

This commit is contained in:
Evan Hunt
2017-09-12 19:05:46 -07:00
parent 30973087a0
commit 586e65ea5c
34 changed files with 660 additions and 115 deletions

View File

@@ -318,14 +318,16 @@ pk11_rand_seed_fromfile(const char *randomfile) {
ret = isc_stdio_open(randomfile, "r", &stream);
if (ret != ISC_R_SUCCESS)
goto cleanup;
ret = isc_stdio_read(seed, 1, SEEDSIZE, stream, &cc);
if (ret!= ISC_R_SUCCESS)
goto cleanup;
while (ret == ISC_R_SUCCESS) {
ret = isc_stdio_read(seed, 1, SEEDSIZE, stream, &cc);
if ((ret != ISC_R_SUCCESS) && (ret != ISC_R_EOF))
goto cleanup;
(void) pkcs_C_SeedRandom(ctx.session, seed, (CK_ULONG) cc);
}
ret = isc_stdio_close(stream);
stream = NULL;
if (ret!= ISC_R_SUCCESS)
if (ret != ISC_R_SUCCESS)
goto cleanup;
(void) pkcs_C_SeedRandom(ctx.session, seed, (CK_ULONG) cc);
cleanup:
if (stream != NULL)