X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=test%2Fdrbgtest.c;h=362a1d2b49919377f568845136911edbffae9a9a;hb=b1522fa5ef676b7af0128eab3eee608af3416182;hp=1aef1fe41a78fb97a297c35764980f2417e3ba2d;hpb=1c615e4ce97715ae3af9255bc57be32a49687966;p=openssl.git diff --git a/test/drbgtest.c b/test/drbgtest.c index 1aef1fe41a..362a1d2b49 100644 --- a/test/drbgtest.c +++ b/test/drbgtest.c @@ -1,7 +1,7 @@ /* * Copyright 2011-2018 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html @@ -429,7 +429,7 @@ static int error_check(DRBG_SELFTEST_DATA *td) */ /* Test explicit reseed with too large additional input */ - if (!init(drbg, td, &t) + if (!instantiate(drbg, td, &t) || RAND_DRBG_reseed(drbg, td->adin, drbg->max_adinlen + 1, 0) > 0) goto err; @@ -440,7 +440,7 @@ static int error_check(DRBG_SELFTEST_DATA *td) goto err; /* Test explicit reseed with too much entropy */ - if (!init(drbg, td, &t)) + if (!instantiate(drbg, td, &t)) goto err; t.entropylen = drbg->max_entropylen + 1; if (!TEST_int_le(RAND_DRBG_reseed(drbg, td->adin, td->adinlen, 0), 0) @@ -448,7 +448,7 @@ static int error_check(DRBG_SELFTEST_DATA *td) goto err; /* Test explicit reseed with too little entropy */ - if (!init(drbg, td, &t)) + if (!instantiate(drbg, td, &t)) goto err; t.entropylen = drbg->min_entropylen - 1; if (!TEST_int_le(RAND_DRBG_reseed(drbg, td->adin, td->adinlen, 0), 0) @@ -839,6 +839,11 @@ typedef HANDLE thread_t; static DWORD WINAPI thread_run(LPVOID arg) { run_multi_thread_test(); + /* + * Because we're linking with a static library, we must stop each + * thread explicitly, or so says OPENSSL_thread_stop(3) + */ + OPENSSL_thread_stop(); return 0; } @@ -860,6 +865,11 @@ typedef pthread_t thread_t; static void *thread_run(void *arg) { run_multi_thread_test(); + /* + * Because we're linking with a static library, we must stop each + * thread explicitly, or so says OPENSSL_thread_stop(3) + */ + OPENSSL_thread_stop(); return NULL; }