VirtualBox

source: vbox/trunk/src/libs/openssl-1.1.1l/fuzz/rand.inc@ 95000

Last change on this file since 95000 was 91772, checked in by vboxsync, 3 years ago

openssl-1.1.1l: Applied and adjusted our OpenSSL changes to 1.1.1l. bugref:10126

File size: 765 bytes
Line 
1/*
2 * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL licenses, (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * https://www.openssl.org/source/license.html
8 * or in the file LICENSE in the source distribution.
9 */
10#include <openssl/rand.h>
11
12static int fuzz_bytes(unsigned char *buf, int num)
13{
14 unsigned char val = 1;
15
16 while (--num >= 0)
17 *buf++ = val++;
18 return 1;
19}
20
21static int fuzz_status(void)
22{
23 return 1;
24}
25
26static RAND_METHOD fuzz_rand_method = {
27 NULL,
28 fuzz_bytes,
29 NULL,
30 NULL,
31 fuzz_bytes,
32 fuzz_status
33};
34
35void FuzzerSetRand(void)
36{
37 RAND_set_rand_method(&fuzz_rand_method);
38}
39
40
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette