1CURLOPT_RANDOM_FILE(3) curl_easy_setopt options CURLOPT_RANDOM_FILE(3)
2
3
4
6 CURLOPT_RANDOM_FILE - specify a source for random data
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char
12 *path);
13
15 Pass a char * to a zero 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
22 NULL, not used
23
25 All
26
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
37 Always
38
40 Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufâ
41 ficient heap space.
42
44 CURLOPT_EGDSOCKET(3),
45
46
47
48libcurl 7.61.1 May 31, 2017 CURLOPT_RANDOM_FILE(3)