/* * Copyright 2011-2020 The OpenSSL Project Authors. All Rights Reserved. * * 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 *//* * RAND_DRBG_set is deprecated for public use, but still ok for * internal use. */#include"internal/deprecated.h"#include<string.h>#include"internal/nelem.h"#include<openssl/crypto.h>#include<openssl/err.h>#include<openssl/rand.h>#include<openssl/obj_mac.h>#include<openssl/evp.h>#include<openssl/aes.h>#include"../crypto/rand/rand_local.h"#include"../include/crypto/rand.h"#include"../providers/implementations/rands/drbg_local.h"#include"../crypto/evp/evp_local.h"#if defined(_WIN32)#include<windows.h>#endif#if defined(OPENSSL_SYS_UNIX)#include<sys/types.h>#include<sys/wait.h>#include<unistd.h>#endif#include"testutil.h"#include"drbgtest.h"typedefstructdrbg_selftest_data_st{intpost;intnid;unsignedintflags;/* KAT data for no PR */constunsignedchar*entropy;size_tentropylen;constunsignedchar*nonce;size_tnoncelen;constunsignedchar*pers;size_tperslen;constunsignedchar*adin;size_tadinlen;constunsignedchar*entropyreseed;size_tentropyreseedlen;constunsignedchar*adinreseed;size_tadinreseedlen;constunsignedchar*adin2;size_tadin2len;constunsignedchar*expected;size_texlen;constunsignedchar*kat2;size_tkat2len;/* KAT data for PR */constunsignedchar*entropy_pr;size_tentropylen_pr;constunsignedchar*nonce_pr;size_tnoncelen_pr;constunsignedchar*pers_pr;size_tperslen_pr;constunsignedchar*adin_pr;size_tadinlen_pr;constunsignedchar*entropypr_pr;size_tentropyprlen_pr;constunsignedchar*ading_pr;size_tadinglen_pr;constunsignedchar*entropyg_pr;size_tentropyglen_pr;constunsignedchar*kat_pr;size_tkatlen_pr;constunsignedchar*kat2_pr;size_tkat2len_pr;