DRBG: make locking api truly private
[openssl.git] / crypto / rand / rand_lib.c
index 289acf3..7b8b8fc 100644 (file)
@@ -203,13 +203,13 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg,
              * generating bits from it. (Note: taking the lock will be a no-op
              * if locking if drbg->parent->lock == NULL.)
              */
-            RAND_DRBG_lock(drbg->parent);
+            rand_drbg_lock(drbg->parent);
             if (RAND_DRBG_generate(drbg->parent,
                                    buffer, bytes_needed,
                                    0,
                                    (unsigned char *)drbg, sizeof(*drbg)) != 0)
                 bytes = bytes_needed;
-            RAND_DRBG_unlock(drbg->parent);
+            rand_drbg_unlock(drbg->parent);
 
             entropy_available = RAND_POOL_add_end(pool, bytes, 8 * bytes);
         }
@@ -405,9 +405,9 @@ int RAND_poll(void)
         if (drbg == NULL)
             return 0;
 
-        RAND_DRBG_lock(drbg);
+        rand_drbg_lock(drbg);
         ret = rand_drbg_restart(drbg, NULL, 0, 0);
-        RAND_DRBG_unlock(drbg);
+        rand_drbg_unlock(drbg);
 
         return ret;
 
@@ -797,9 +797,9 @@ int RAND_priv_bytes(unsigned char *buf, int num)
         return 0;
 
     /* We have to lock the DRBG before generating bits from it. */
-    RAND_DRBG_lock(drbg);
+    rand_drbg_lock(drbg);
     ret = RAND_DRBG_bytes(drbg, buf, num);
-    RAND_DRBG_unlock(drbg);
+    rand_drbg_unlock(drbg);
     return ret;
 }