Check RAND_bytes() return value or use RAND_pseudo_bytes().
[openssl.git] / crypto / evp / bio_ok.c
index 101275d6487085c8e48f902ea604b3a8189b74de..a54384a71c8bf1e370b0adce1d0664a2a4198514 100644 (file)
@@ -451,7 +451,7 @@ static void sig_out(BIO* b)
        if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return;
 
        EVP_DigestInit(md, md->digest);
-       RAND_bytes(&(md->md.base[0]), md->digest->md_size);
+       RAND_pseudo_bytes(&(md->md.base[0]), md->digest->md_size);
        memcpy(&(ctx->buf[ctx->buf_len]), &(md->md.base[0]), md->digest->md_size);
        longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size);
        ctx->buf_len+= md->digest->md_size;