Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
savoirfairelinux
jami-daemon
Commits
a475c87f
Commit
a475c87f
authored
11 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
tls: fix impossible conditional
hostname.c_str() can never == 0 Refs #44716
parent
6348fd9c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/sip/security_evaluator.cpp
+3
-5
3 additions, 5 deletions
daemon/src/sip/security_evaluator.cpp
with
3 additions
and
5 deletions
daemon/src/sip/security_evaluator.cpp
+
3
−
5
View file @
a475c87f
...
@@ -196,15 +196,13 @@ bool SecurityEvaluator::verifyHostnameCertificate(const std::string& certificate
...
@@ -196,15 +196,13 @@ bool SecurityEvaluator::verifyHostnameCertificate(const std::string& certificate
SecurityEvaluator
::
HostnameValidationResult
SecurityEvaluator
::
HostnameValidationResult
SecurityEvaluator
::
validateHostname
(
const
std
::
string
&
hostname
,
const
X509
*
server_cert
)
SecurityEvaluator
::
validateHostname
(
const
std
::
string
&
hostname
,
const
X509
*
server_cert
)
{
{
HostnameValidationResult
result
;
if
(
hostname
.
empty
()
or
server_cert
==
nullptr
)
{
DEBUG
(
"hostname empty or server_cert is NULL"
);
if
(
hostname
.
c_str
()
==
nullptr
||
(
server_cert
==
nullptr
))
{
DEBUG
(
"hostname.c_str() == nullptr || (server_cert == nullptr)"
);
return
Error
;
return
Error
;
}
}
// First try the Subject Alternative Names extension
// First try the Subject Alternative Names extension
result
=
matchSubjectAltName
(
hostname
,
server_cert
);
HostnameValidationResult
result
=
matchSubjectAltName
(
hostname
,
server_cert
);
if
(
result
==
NoSANPresent
)
{
if
(
result
==
NoSANPresent
)
{
// Extension was not found: try the Common Name
// Extension was not found: try the Common Name
result
=
matchCommonName
(
hostname
,
server_cert
);
result
=
matchCommonName
(
hostname
,
server_cert
);
...
...
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