Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
ab86007d
Commit
ab86007d
authored
9 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
curl: warn for --capath use if not supported by libcurl
Closes #492
parent
768f18f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tool_operate.c
+13
-3
13 additions, 3 deletions
src/tool_operate.c
with
13 additions
and
3 deletions
src/tool_operate.c
+
13
−
3
View file @
ab86007d
...
...
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 201
5
, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 201
6
, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
...
...
@@ -239,6 +239,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
* We support the environment variable thing for non-Windows platforms
* too. Just for the sake of it.
*/
bool
capath_from_env
=
false
;
if
(
!
config
->
cacert
&&
!
config
->
capath
&&
!
config
->
insecure_ok
)
{
...
...
@@ -263,6 +264,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
result
=
CURLE_OUT_OF_MEMORY
;
goto
quit_curl
;
}
capath_from_env
=
true
;
}
else
{
env
=
curlx_getenv
(
"SSL_CERT_FILE"
);
...
...
@@ -1009,8 +1011,16 @@ static CURLcode operate_do(struct GlobalConfig *global,
if
(
config
->
cacert
)
my_setopt_str
(
curl
,
CURLOPT_CAINFO
,
config
->
cacert
);
if
(
config
->
capath
)
my_setopt_str
(
curl
,
CURLOPT_CAPATH
,
config
->
capath
);
if
(
config
->
capath
)
{
result
=
res_setopt_str
(
curl
,
CURLOPT_CAPATH
,
config
->
capath
);
if
(
result
==
CURLE_NOT_BUILT_IN
)
{
warnf
(
config
->
global
,
"ignoring %s, not supported by libcurl
\n
"
,
capath_from_env
?
"SSL_CERT_DIR environment variable"
:
"--capath"
);
}
else
if
(
result
)
goto
show_error
;
}
if
(
config
->
crlfile
)
my_setopt_str
(
curl
,
CURLOPT_CRLFILE
,
config
->
crlfile
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment