1CURLOPT_RANDOM_FILE(3) curl_easy_setopt options CURLOPT_RANDOM_FILE(3)
2
3
4
6 CURLOPT_RANDOM_FILE - file to read random data from
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path);
12
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
21 NULL, not used
22
24 All
25
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
36 Always
37
39 Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufâ
40 ficient heap space.
41
43 CURLOPT_EGDSOCKET(3),
44
45
46
47libcurl 7.82.0 November 26, 2021 CURLOPT_RANDOM_FILE(3)