rand_local.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #ifndef OSSL_CRYPTO_RAND_LOCAL_H
  10. # define OSSL_CRYPTO_RAND_LOCAL_H
  11. # include <openssl/aes.h>
  12. # include <openssl/evp.h>
  13. # include <openssl/sha.h>
  14. # include <openssl/hmac.h>
  15. # include <openssl/ec.h>
  16. # include <openssl/rand.h>
  17. # include "internal/tsan_assist.h"
  18. # include "crypto/rand.h"
  19. /* Default reseed intervals */
  20. # define PRIMARY_RESEED_INTERVAL (1 << 8)
  21. # define SECONDARY_RESEED_INTERVAL (1 << 16)
  22. # define PRIMARY_RESEED_TIME_INTERVAL (60 * 60) /* 1 hour */
  23. # define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  24. # ifndef FIPS_MODULE
  25. /* The global RAND method, and the global buffer and DRBG instance. */
  26. extern RAND_METHOD ossl_rand_meth;
  27. # endif
  28. #endif