1---
2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_EGDSOCKET
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_RANDOM_FILE (3)
9---
10
11# NAME
12
13CURLOPT_EGDSOCKET - EGD socket path
14
15# SYNOPSIS
16
17~~~c
18#include <curl/curl.h>
19
20CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EGDSOCKET, char *path);
21~~~
22
23# DESCRIPTION
24
25Deprecated option. It serves no purpose anymore.
26
27Pass a char pointer to the null-terminated path name to the Entropy Gathering
28Daemon socket. It is used to seed the random engine for TLS.
29
30The application does not have to keep the string around after setting this
31option.
32
33# DEFAULT
34
35NULL
36
37# PROTOCOLS
38
39All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
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_EGDSOCKET, "/var/egd.socket");
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 if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
67CURLE_OUT_OF_MEMORY if there was insufficient heap space.
68