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

NAME

6       CURLOPT_RANDOM_FILE - file to read random data from
7

SYNOPSIS

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

DESCRIPTION

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

DEFAULT

21       NULL, not used
22

PROTOCOLS

24       All
25

EXAMPLE

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

AVAILABILITY

36       Always
37

RETURN VALUE

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

SEE ALSO

43       CURLOPT_EGDSOCKET(3),
44
45
46
47libcurl 7.82.0                 November 26, 2021        CURLOPT_RANDOM_FILE(3)
Impressum