Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
8a0daa17
Unverified
Commit
8a0daa17
authored
Jun 04, 2018
by
Ian Craggs
Committed by
GitHub
Jun 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #464 from ArcolaEnergy/ssl-verify-tweaks-4
Tweaks to ssl hostname verification
parents
c897ebac
b1a0199c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
SSLSocket.c
src/SSLSocket.c
+7
-2
No files found.
src/SSLSocket.c
View file @
8a0daa17
...
...
@@ -691,10 +691,15 @@ int SSLSocket_connect(SSL* ssl, int sock, const char* hostname, int verify)
hostname_len
=
MQTTProtocol_addressPort
(
hostname
,
&
port
,
NULL
);
rc
=
X509_check_host
(
cert
,
hostname
,
hostname_len
,
0
,
&
peername
);
if
(
rc
==
0
)
rc
=
SOCKET_ERROR
;
Log
(
TRACE_MIN
,
-
1
,
"rc from X509_check_host is %d"
,
rc
);
Log
(
TRACE_MIN
,
-
1
,
"peername from X509_check_host is %s"
,
peername
);
if
(
peername
!=
NULL
)
OPENSSL_free
(
peername
);
// 0 == fail, -1 == SSL internal error
if
(
rc
==
0
||
rc
==
-
1
)
rc
=
SSL_FATAL
;
if
(
cert
)
X509_free
(
cert
);
...
...
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