Fixed issue where DRBG_CTR fails if NO_DF is used - when entropy is called
authorShane Lontis <shane.lontis@oracle.com>
Wed, 25 Jul 2018 01:08:48 +0000 (11:08 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 25 Jul 2018 20:58:44 +0000 (06:58 +1000)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/6778)

crypto/rand/rand_lib.c

index d31735c..6123d14 100644 (file)
@@ -174,7 +174,7 @@ size_t rand_drbg_get_entropy(RAND_DRBG *drbg,
             if (RAND_DRBG_generate(drbg->parent,
                                    buffer, bytes_needed,
                                    prediction_resistance,
-                                   (unsigned char *)drbg, sizeof(*drbg)) != 0)
+                                   NULL, 0) != 0)
                 bytes = bytes_needed;
             rand_drbg_unlock(drbg->parent);