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
e7a289eb
Commit
e7a289eb
authored
10 years ago
by
Jay Satiro
Committed by
Daniel Stenberg
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vtls: Don't accept unknown CURLOPT_SSLVERSION values
parent
488102fc
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
lib/vtls/vtls.c
+19
-0
19 additions, 0 deletions
lib/vtls/vtls.c
with
19 additions
and
0 deletions
lib/vtls/vtls.c
+
19
−
0
View file @
e7a289eb
...
...
@@ -276,10 +276,25 @@ void Curl_ssl_cleanup(void)
}
}
static
bool
ssl_prefs_check
(
struct
SessionHandle
*
data
)
{
/* check for CURLOPT_SSLVERSION invalid parameter value */
if
((
data
->
set
.
ssl
.
version
<
0
)
||
(
data
->
set
.
ssl
.
version
>=
CURL_SSLVERSION_LAST
))
{
failf
(
data
,
"Unrecognized parameter value passed via CURLOPT_SSLVERSION"
);
return
FALSE
;
}
return
TRUE
;
}
CURLcode
Curl_ssl_connect
(
struct
connectdata
*
conn
,
int
sockindex
)
{
CURLcode
result
;
if
(
!
ssl_prefs_check
(
conn
->
data
))
return
CURLE_SSL_CONNECT_ERROR
;
/* mark this is being ssl-enabled from here on. */
conn
->
ssl
[
sockindex
].
use
=
TRUE
;
conn
->
ssl
[
sockindex
].
state
=
ssl_connection_negotiating
;
...
...
@@ -297,6 +312,10 @@ Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
bool
*
done
)
{
CURLcode
result
;
if
(
!
ssl_prefs_check
(
conn
->
data
))
return
CURLE_SSL_CONNECT_ERROR
;
/* mark this is being ssl requested from here on. */
conn
->
ssl
[
sockindex
].
use
=
TRUE
;
#ifdef curlssl_connect_nonblocking
...
...
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