aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorShreenidhi Shedi <[email protected]>2026-07-09 12:54:07 +0200
committerNorbert Pocs <[email protected]>2026-08-07 15:29:28 +0200
commit2f6c5fc193e76395d373e485f27f8794d65b73f9 (patch)
treef9445315ea01bec8ef5c0405aac75aac36bd5d88 /apps
parentapps/tsget: replace CURLOPT_UPLOAD with CURLOPT_POST (diff)
downloadopenssl-2f6c5fc193e76395d373e485f27f8794d65b73f9.tar.gz
openssl-2f6c5fc193e76395d373e485f27f8794d65b73f9.zip
apps/tsget: enable use warnings
Add "use warnings" and wrap CURLOPT_RANDOM_FILE and CURLOPT_EGDSOCKET setopt calls in eval blocks, as these constants were removed from libcurl and would cause an exception on modern installations. Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Shreenidhi Shedi <[email protected]> Reviewed-by: Andrew Dinh <[email protected]> Reviewed-by: Matt Caswell <[email protected]> MergeDate: Fri Aug 7 13:29:37 2026 (Merged from https://github.com/openssl/openssl/pull/31445)
Diffstat (limited to 'apps')
-rw-r--r--apps/tsget.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/tsget.in b/apps/tsget.in
index 4fab476e5fb..51b78e92454 100644
--- a/apps/tsget.in
+++ b/apps/tsget.in
@@ -8,6 +8,7 @@
# https://www.openssl.org/source/license.html
use strict;
+use warnings;
use IO::Handle;
use Getopt::Std;
use File::Basename;
@@ -41,8 +42,11 @@ sub create_curl {
$curl->setopt(CURLOPT_SSLCERT, $options{c}) if defined($options{c});
$curl->setopt(CURLOPT_CAINFO, $options{C}) if defined($options{C});
$curl->setopt(CURLOPT_CAPATH, $options{P}) if defined($options{P});
- $curl->setopt(CURLOPT_RANDOM_FILE, $options{r}) if defined($options{r});
- $curl->setopt(CURLOPT_EGDSOCKET, $options{g}) if defined($options{g});
+
+ # CURLOPT_RANDOM_FILE and CURLOPT_EGDSOCKET were removed from libcurl;
+ # wrap in eval so we fail gracefully on newer versions.
+ eval { $curl->setopt(CURLOPT_RANDOM_FILE, $options{r}) if defined($options{r}); };
+ eval { $curl->setopt(CURLOPT_EGDSOCKET, $options{g}) if defined($options{g}); };
# Setting destination.
$curl->setopt(CURLOPT_URL, $url);