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
75ffd9ea
Commit
75ffd9ea
authored
Sep 30, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gnutls: kill relocations
parent
a5a93926
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
modules/misc/gnutls.c
modules/misc/gnutls.c
+10
-16
No files found.
modules/misc/gnutls.c
View file @
75ffd9ea
...
...
@@ -240,13 +240,11 @@ static int gnutls_ContinueHandshake (vlc_tls_t *session)
}
typedef
struct
static
struct
{
int
flag
;
const
char
*
msg
;
}
error_msg_t
;
static
const
error_msg_t
cert_errors
[]
=
const
char
msg
[
44
];
}
cert_errs
[]
=
{
{
GNUTLS_CERT_INVALID
,
"Certificate could not be verified"
},
...
...
@@ -262,7 +260,6 @@ static const error_msg_t cert_errors[] =
"Certificate is not yet activated"
},
{
GNUTLS_CERT_EXPIRED
,
"Certificate has expired"
},
{
0
,
NULL
}
};
...
...
@@ -280,26 +277,23 @@ static int gnutls_HandshakeAndValidate (vlc_tls_t *session)
val
=
gnutls_certificate_verify_peers2
(
sys
->
session
,
&
status
);
if
(
val
)
{
msg_Err
(
session
,
"Certificate verification
failed
: %s"
,
msg_Err
(
session
,
"Certificate verification
error
: %s"
,
gnutls_strerror
(
val
));
return
-
1
;
}
if
(
status
)
{
msg_Err
(
session
,
"TLS session: access denied (status 0x%X)"
,
status
);
for
(
const
error_msg_t
*
e
=
cert_errors
;
e
->
flag
;
e
++
)
{
if
(
status
&
e
->
flag
)
msg_Err
(
session
,
"Certificate verification failure:"
);
for
(
size_t
i
=
0
;
i
<
sizeof
(
cert_errs
)
/
sizeof
(
cert_errs
[
0
]);
i
++
)
if
(
status
&
cert_errs
[
i
].
flag
)
{
msg_Err
(
session
,
"
%s"
,
e
->
msg
);
status
&=
~
e
->
flag
;
msg_Err
(
session
,
"
* %s"
,
cert_errs
[
i
].
msg
);
status
&=
~
cert_errs
[
i
].
flag
;
}
}
if
(
status
)
msg_Err
(
session
,
"unknown certificate error (you found a bug in VLC)"
);
msg_Err
(
session
,
" * Unknown verification error 0x%04X"
,
status
);
return
-
1
;
}
...
...
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