1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_RANDOM_FILE 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_EGDSOCKET (3) 9--- 10 11# NAME 12 13CURLOPT_RANDOM_FILE - file to read random data from 14 15# SYNOPSIS 16 17~~~c 18#include <curl/curl.h> 19 20CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path); 21~~~ 22 23# DESCRIPTION 24 25Deprecated option. It serves no purpose anymore. 26 27Pass a char pointer to a null-terminated filename. The file might be used to 28read from to seed the random engine for SSL and more. 29 30The application does not have to keep the string around after setting this 31option. 32 33# DEFAULT 34 35NULL, not used 36 37# PROTOCOLS 38 39All 40 41# EXAMPLE 42 43~~~c 44int main(void) 45{ 46 CURL *curl = curl_easy_init(); 47 if(curl) { 48 CURLcode res; 49 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); 50 curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, "junk.txt"); 51 res = curl_easy_perform(curl); 52 curl_easy_cleanup(curl); 53 } 54} 55~~~ 56 57# AVAILABILITY 58 59If built with TLS enabled. Only the OpenSSL backend uses this, and only with 60OpenSSL versions before 1.1.0. 61 62This option was deprecated in 7.84.0. 63 64# RETURN VALUE 65 66Returns CURLE_OK on success or 67CURLE_OUT_OF_MEMORY if there was insufficient heap space. 68