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
ffbb0f0d
Commit
ffbb0f0d
authored
8 years ago
by
Nick Zitzmann
Browse files
Options
Downloads
Patches
Plain Diff
darwinssl: --insecure overrides --cacert if both settings are in use
Fixes #1184
parent
4f2239c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/vtls/darwinssl.c
+2
-7
2 additions, 7 deletions
lib/vtls/darwinssl.c
with
2 additions
and
7 deletions
lib/vtls/darwinssl.c
+
2
−
7
View file @
ffbb0f0d
...
@@ -1393,18 +1393,13 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn,
...
@@ -1393,18 +1393,13 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn,
}
}
#endif
/* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
#endif
/* CURL_BUILD_MAC_10_6 || CURL_BUILD_IOS */
if
(
ssl_cafile
)
{
if
(
ssl_cafile
&&
verifypeer
)
{
bool
is_cert_file
=
is_file
(
ssl_cafile
);
bool
is_cert_file
=
is_file
(
ssl_cafile
);
if
(
!
is_cert_file
)
{
if
(
!
is_cert_file
)
{
failf
(
data
,
"SSL: can't load CA certificate file %s"
,
ssl_cafile
);
failf
(
data
,
"SSL: can't load CA certificate file %s"
,
ssl_cafile
);
return
CURLE_SSL_CACERT_BADFILE
;
return
CURLE_SSL_CACERT_BADFILE
;
}
}
if
(
!
verifypeer
)
{
failf
(
data
,
"SSL: CA certificate set, but certificate verification "
"is disabled"
);
return
CURLE_SSL_CONNECT_ERROR
;
}
}
}
/* Configure hostname check. SNI is used if available.
/* Configure hostname check. SNI is used if available.
...
@@ -1929,7 +1924,7 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex)
...
@@ -1929,7 +1924,7 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex)
/* The below is errSSLServerAuthCompleted; it's not defined in
/* The below is errSSLServerAuthCompleted; it's not defined in
Leopard's headers */
Leopard's headers */
case
-
9841
:
case
-
9841
:
if
(
SSL_CONN_CONFIG
(
CAfile
))
{
if
(
SSL_CONN_CONFIG
(
CAfile
)
&&
SSL_CONN_CONFIG
(
verifypeer
)
)
{
int
res
=
verify_cert
(
SSL_CONN_CONFIG
(
CAfile
),
data
,
int
res
=
verify_cert
(
SSL_CONN_CONFIG
(
CAfile
),
data
,
connssl
->
ssl_ctx
);
connssl
->
ssl_ctx
);
if
(
res
!=
CURLE_OK
)
if
(
res
!=
CURLE_OK
)
...
...
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