Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
3ece7ecb
Commit
3ece7ecb
authored
Sep 15, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
There is really no excuse for not checking the hostname.
I wonder why I added this option in the first place.
parent
2cbdbc87
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
modules/misc/gnutls.c
modules/misc/gnutls.c
+7
-16
No files found.
modules/misc/gnutls.c
View file @
3ece7ecb
...
...
@@ -80,11 +80,6 @@ static void Close( vlc_object_t * );
"This ensures that the server certificate is valid " \
"(i.e. signed by an approved Certification Authority)." )
#define CHECK_HOSTNAME_TEXT N_("Check TLS/SSL server hostname in certificate")
#define CHECK_HOSTNAME_LONGTEXT N_( \
"This ensures that the server hostname in certificate matches the " \
"requested host name." )
vlc_module_begin
();
set_shortname
(
"GnuTLS"
);
set_description
(
_
(
"GnuTLS TLS encryption layer"
)
);
...
...
@@ -95,8 +90,7 @@ vlc_module_begin();
add_bool
(
"tls-check-cert"
,
VLC_TRUE
,
NULL
,
CHECK_CERT_TEXT
,
CHECK_CERT_LONGTEXT
,
VLC_FALSE
);
add_bool
(
"tls-check-hostname"
,
VLC_TRUE
,
NULL
,
CHECK_HOSTNAME_TEXT
,
CHECK_HOSTNAME_LONGTEXT
,
VLC_FALSE
);
add_deprecated_bool
(
"tls-check-hostname"
);
add_integer
(
"gnutls-dh-bits"
,
DH_BITS
,
NULL
,
DH_BITS_TEXT
,
DH_BITS_LONGTEXT
,
VLC_TRUE
);
...
...
@@ -398,18 +392,15 @@ gnutls_BeginHandshake( tls_session_t *p_session, int fd,
if
(
psz_hostname
!=
NULL
)
{
gnutls_server_name_set
(
p_sys
->
session
,
GNUTLS_NAME_DNS
,
psz_hostname
,
strlen
(
psz_hostname
)
);
if
(
var_CreateGetBool
(
p_session
,
"tls-check-hostname"
))
{
p_sys
->
psz_hostname
=
strdup
(
psz_hostname
);
if
(
p_sys
->
psz_hostname
==
NULL
)
gnutls_server_name_set
(
p_sys
->
session
,
GNUTLS_NAME_DNS
,
psz_hostname
,
strlen
(
psz_hostname
));
p_sys
->
psz_hostname
=
strdup
(
psz_hostname
);
if
(
p_sys
->
psz_hostname
==
NULL
)
{
p_session
->
pf_close
(
p_session
);
p_session
->
pf_close
(
p_session
);
return
-
1
;
}
}
}
return
p_session
->
pf_handshake2
(
p_session
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment