mirror of
https://github.com/openssl/openssl.git
synced 2024-12-09 05:51:54 +08:00
7d615e2178
The RAND_DRBG API did not fit well into the new provider concept as implemented by EVP_RAND and EVP_RAND_CTX. The main reason is that the RAND_DRBG API is a mixture of 'front end' and 'back end' API calls and some of its API calls are rather low-level. This holds in particular for the callback mechanism (RAND_DRBG_set_callbacks()) and the RAND_DRBG type changing mechanism (RAND_DRBG_set()). Adding a compatibility layer to continue supporting the RAND_DRBG API as a legacy API for a regular deprecation period turned out to come at the price of complicating the new provider API unnecessarily. Since the RAND_DRBG API exists only since version 1.1.1, it was decided by the OMC to drop it entirely. Other related changes: Use RNG instead of DRBG in EVP_RAND documentation. The documentation was using DRBG in places where it should have been RNG or CSRNG. Move the RAND_DRBG(7) documentation to EVP_RAND(7). Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/12509)
32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
/*
|
|
* Copyright 1995-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
|
|
*/
|
|
|
|
#ifndef OSSL_CRYPTO_RAND_LOCAL_H
|
|
# define OSSL_CRYPTO_RAND_LOCAL_H
|
|
|
|
# include <openssl/aes.h>
|
|
# include <openssl/evp.h>
|
|
# include <openssl/sha.h>
|
|
# include <openssl/hmac.h>
|
|
# include <openssl/ec.h>
|
|
# include <openssl/rand.h>
|
|
# include "internal/tsan_assist.h"
|
|
# include "crypto/rand.h"
|
|
|
|
/* Default reseed intervals */
|
|
# 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 */
|
|
|
|
/* The global RAND method, and the global buffer and DRBG instance. */
|
|
extern RAND_METHOD rand_meth;
|
|
|
|
#endif
|