Skip to content

Commit

Permalink
tls: Remove EXAMPLEs from deprecated options
Browse files Browse the repository at this point in the history
CURLOPT_EGDSOCKET and CURLOPT_RANDOM_FILE are both completely dead
so remove their example sections since the code there is useless.
There is still a way to inject a random file for OpenSSL older than
1.1.0 but it's not what the example showed (and it's not even done
with this option) so we refrain from documenting it here.

Closes: #13540
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
  • Loading branch information
danielgustafsson committed May 6, 2024
1 parent 26dd9f0 commit 46d7214
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 52 deletions.
27 changes: 1 addition & 26 deletions docs/libcurl/opts/CURLOPT_EGDSOCKET.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,14 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EGDSOCKET, char *path);
Deprecated option. It serves no purpose anymore.
Pass a char pointer to the null-terminated path name to the Entropy Gathering
Daemon socket. It is used to seed the random engine for TLS.
The application does not have to keep the string around after setting this
option.
# DEFAULT
NULL
# EXAMPLE
~~~c
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_EGDSOCKET, "/var/egd.socket");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~

# AVAILABILITY
Only with OpenSSL versions before 1.1.0.

This option was deprecated in 7.84.0.
# RETURN VALUE
Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
Returns CURLE_OK.
27 changes: 1 addition & 26 deletions docs/libcurl/opts/CURLOPT_RANDOM_FILE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,14 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path);
Deprecated option. It serves no purpose anymore.
Pass a char pointer to a null-terminated filename. The file might be used to
read from to seed the random engine for SSL and more.
The application does not have to keep the string around after setting this
option.
# DEFAULT
NULL, not used
# EXAMPLE
~~~c
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_RANDOM_FILE, "junk.txt");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
~~~

# AVAILABILITY
Only with OpenSSL versions before 1.1.0.

This option was deprecated in 7.84.0.
# RETURN VALUE
Returns CURLE_OK on success or
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
Returns CURLE_OK.
2 changes: 2 additions & 0 deletions tests/test1173.pl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
CURLINFO_DATA_OUT => 1,
CURLINFO_SSL_DATA_IN => 1,
CURLINFO_SSL_DATA_OUT => 1,
CURLOPT_EGDSOCKET => 1,
CURLOPT_RANDOM_FILE => 1,
);
sub allsymbols {
open(my $f, "<", "$symbolsinversions") ||
Expand Down

0 comments on commit 46d7214

Please sign in to comment.