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 Deprecated option. It serves no purpose anymore.
15
16 Pass a char * to a null-terminated file name. The file might be used to
17 read from to seed the random engine for SSL and more.
18
19 The application does not have to keep the string around after setting
20 this option.
21
23 NULL, not used
24
26 All
27
29 CURL *curl = curl_easy_init();
30 if(curl) {
31 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
32 curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, "junk.txt");
33 ret = curl_easy_perform(curl);
34 curl_easy_cleanup(curl);
35 }
36
38 If built with TLS enabled. Only the OpenSSL backend will use this, and
39 only with OpenSSL versions before 1.1.0.
40
41 This option was deprecated in 7.84.0.
42
44 Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufâ
45 ficient heap space.
46
48 CURLOPT_EGDSOCKET(3),
49
50
51
52libcurl 7.85.0 May 17, 2022 CURLOPT_RANDOM_FILE(3)