]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/rand/prov_seed.c
Update copyright year
[thirdparty/openssl.git] / crypto / rand / prov_seed.c
index f79955180a2dd06237423f127e2c152ad9f633c4..afa85ab76f2f004239631f8a2e2822909e829e01 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2020-2021 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
@@ -20,7 +20,7 @@ size_t ossl_rand_get_entropy(ossl_unused OSSL_CORE_HANDLE *handle,
     size_t entropy_available;
     RAND_POOL *pool;
 
-    pool = rand_pool_new(entropy, 1, min_len, max_len);
+    pool = ossl_rand_pool_new(entropy, 1, min_len, max_len);
     if (pool == NULL) {
         ERR_raise(ERR_LIB_RAND, ERR_R_MALLOC_FAILURE);
         return 0;
@@ -30,11 +30,11 @@ size_t ossl_rand_get_entropy(ossl_unused OSSL_CORE_HANDLE *handle,
     entropy_available = ossl_pool_acquire_entropy(pool);
 
     if (entropy_available > 0) {
-        ret   = rand_pool_length(pool);
-        *pout = rand_pool_detach(pool);
+        ret   = ossl_rand_pool_length(pool);
+        *pout = ossl_rand_pool_detach(pool);
     }
 
-    rand_pool_free(pool);
+    ossl_rand_pool_free(pool);
     return ret;
 }
 
@@ -51,7 +51,7 @@ size_t ossl_rand_get_nonce(ossl_unused OSSL_CORE_HANDLE *handle,
     size_t ret = 0;
     RAND_POOL *pool;
 
-    pool = rand_pool_new(0, 0, min_len, max_len);
+    pool = ossl_rand_pool_new(0, 0, min_len, max_len);
     if (pool == NULL) {
         ERR_raise(ERR_LIB_RAND, ERR_R_MALLOC_FAILURE);
         return 0;
@@ -60,12 +60,12 @@ size_t ossl_rand_get_nonce(ossl_unused OSSL_CORE_HANDLE *handle,
     if (!ossl_pool_add_nonce_data(pool))
         goto err;
 
-    if (salt != NULL && !rand_pool_add(pool, salt, salt_len, 0))
+    if (salt != NULL && !ossl_rand_pool_add(pool, salt, salt_len, 0))
         goto err;
-    ret   = rand_pool_length(pool);
-    *pout = rand_pool_detach(pool);
+    ret   = ossl_rand_pool_length(pool);
+    *pout = ossl_rand_pool_detach(pool);
  err:
-    rand_pool_free(pool);
+    ossl_rand_pool_free(pool);
     return ret;
 }