2016-05-18 02:52:22 +08:00
|
|
|
/*
|
2021-04-08 20:04:41 +08:00
|
|
|
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
2000-07-20 05:43:23 +08:00
|
|
|
*
|
2018-12-06 20:52:15 +08:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 02:52:22 +08:00
|
|
|
* 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
|
2000-07-20 05:43:23 +08:00
|
|
|
*/
|
|
|
|
|
2019-09-28 06:45:57 +08:00
|
|
|
#ifndef OSSL_CRYPTO_RAND_LOCAL_H
|
|
|
|
# define OSSL_CRYPTO_RAND_LOCAL_H
|
2000-07-20 05:43:23 +08:00
|
|
|
|
2017-06-28 00:04:37 +08:00
|
|
|
# include <openssl/aes.h>
|
|
|
|
# include <openssl/evp.h>
|
|
|
|
# include <openssl/sha.h>
|
|
|
|
# include <openssl/hmac.h>
|
|
|
|
# include <openssl/ec.h>
|
2020-07-22 10:55:31 +08:00
|
|
|
# include <openssl/rand.h>
|
2018-10-14 18:35:19 +08:00
|
|
|
# include "internal/tsan_assist.h"
|
2019-09-28 06:45:33 +08:00
|
|
|
# include "crypto/rand.h"
|
2017-06-28 00:04:37 +08:00
|
|
|
|
2017-11-24 21:59:58 +08:00
|
|
|
/* Default reseed intervals */
|
2020-07-04 08:48:19 +08:00
|
|
|
# define PRIMARY_RESEED_INTERVAL (1 << 8)
|
|
|
|
# define SECONDARY_RESEED_INTERVAL (1 << 16)
|
|
|
|
# define PRIMARY_RESEED_TIME_INTERVAL (60 * 60) /* 1 hour */
|
|
|
|
# define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
|
|
|
|
|
2021-06-04 23:01:24 +08:00
|
|
|
# ifndef FIPS_MODULE
|
2017-08-03 21:23:28 +08:00
|
|
|
/* The global RAND method, and the global buffer and DRBG instance. */
|
2021-03-08 17:17:53 +08:00
|
|
|
extern RAND_METHOD ossl_rand_meth;
|
2021-06-04 23:01:24 +08:00
|
|
|
# endif
|
2017-06-28 00:04:37 +08:00
|
|
|
|
2000-07-20 05:43:23 +08:00
|
|
|
#endif
|