GNURLOPT_RANDOM_FILE(3)
π¦ GNURLOPT_RANDOM_FILE(3) β curl_easy_setopt options π¦
okay so welcome to the GNURLOPT_RANDOM_FILE(3) manual page, bestie β it lives in the curl_easy_setopt options section and it's here to explain how to point curl at a source of random data. no cap, it's a short one, so let's go π
β¨ NAME β¨
CURLOPT_RANDOM_FILE β specify a source for random data. π
πΈ SYNOPSIS πΈ
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char
*path);
π DESCRIPTION π
You're passing a char * that points at a null-terminated file name, bestie. curl might read from that file to seed the random engine for SSL and more. π₯
The application does not have to keep the string around after setting this option β so you can let it go, no strings attached. π«Ά
π DEFAULT π
NULL, not used. literally unused, not even a vibe. π
π PROTOCOLS π
Allβ all of them. every protocol is invited to the party. π
β EXAMPLE β
okay here's the example, copy-paste princess:
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, "junk.txt");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
π¦ AVAILABILITY π¦
Always β she's always available, periodt. β¨
π RETURN VALUE π
Returns CURLE_OK on success, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. π
π SEE ALSO π
CURLOPT_EGDSOCKET(3),β yep, that's the see-also bestie. π«Ά
mwah π this was GNURLOPT_RANDOM_FILE(3) from libcurl 7.37.0, dated 17 Jun 2014 β iconic, no notes. π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms