Skip to content

Commit 9a73852

Browse files
committed
Check wolfSSL_check_domain_name return
1 parent 08737fa commit 9a73852

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

wolfssl/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,11 @@ def __init__(self, sock=None, keyfile=None, certfile=None,
463463
if self._context.check_hostname:
464464

465465
sni = _ffi.new("char[]", server_hostname.encode("utf-8"))
466-
_lib.wolfSSL_check_domain_name(self.native_object,
467-
sni)
466+
ret = _lib.wolfSSL_check_domain_name(self.native_object,
467+
sni)
468+
if ret != _SSL_SUCCESS:
469+
raise SSLError("Unable to set domain name check for "
470+
"hostname verification")
468471

469472
if connected:
470473
try:

0 commit comments

Comments
 (0)