1CURLOPT_RANDOM_FILE(3)     curl_easy_setopt options     CURLOPT_RANDOM_FILE(3)
2
3
4

NAME

6       CURLOPT_RANDOM_FILE - specify a source for random data
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode   curl_easy_setopt(CURL   *handle,  CURLOPT_RANDOM_FILE,  char
12       *path);
13

DESCRIPTION

15       Pass a char * to a null-terminated file name. The file might be used to
16       read from to seed the random engine for SSL and more.
17
18       The  application  does not have to keep the string around after setting
19       this option.
20

DEFAULT

22       NULL, not used
23

PROTOCOLS

25       All
26

EXAMPLE

28       CURL *curl = curl_easy_init();
29       if(curl) {
30         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
31         curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, "junk.txt");
32         ret = curl_easy_perform(curl);
33         curl_easy_cleanup(curl);
34       }
35

AVAILABILITY

37       Always
38

RETURN VALUE

40       Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was  insuf‐
41       ficient heap space.
42

SEE ALSO

44       CURLOPT_EGDSOCKET(3),
45
46
47
48libcurl 7.71.1                   June 25, 2020          CURLOPT_RANDOM_FILE(3)
Impressum