Changeset View
Changeset View
Standalone View
Standalone View
crypto/rand/rand_lib.c
/* | /* | ||||
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. | * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. | ||||
* | * | ||||
* Licensed under the Apache License 2.0 (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 | * this file except in compliance with the License. You can obtain a copy | ||||
Context not available. | |||||
# endif | # endif | ||||
drbg = RAND_get0_primary(NULL); | drbg = RAND_get0_primary(NULL); | ||||
if (drbg != NULL && num > 0) | if (drbg != NULL && num > 0) | ||||
# ifdef OPENSSL_RAND_SEED_NONE | |||||
/* Without an entropy source, we have to rely on the user */ | |||||
EVP_RAND_reseed(drbg, 0, buf, num, NULL, 0); | |||||
# else | |||||
/* With an entropy source, we downgrade this to additional input */ | |||||
EVP_RAND_reseed(drbg, 0, NULL, 0, buf, num); | EVP_RAND_reseed(drbg, 0, NULL, 0, buf, num); | ||||
# endif | |||||
} | } | ||||
# if !defined(OPENSSL_NO_DEPRECATED_1_1_0) | # if !defined(OPENSSL_NO_DEPRECATED_1_1_0) | ||||
Context not available. |