Skip to content

Commit 75fc06b

Browse files
authored
Handle socket.gaierror when retrieving server certificate (#1069)
1 parent 9bdb940 commit 75fc06b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nettacker/core/lib/ssl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ def ssl_version_and_cipher_scan(self, host, port, timeout):
187187
cert = ssl.get_server_certificate((host, port))
188188
except ssl.SSLError:
189189
cert = None
190+
except socket.gaierror:
191+
cert = None
190192
cert_info = get_cert_info(cert) if cert else None
191193
ssl_ver, weak_version = is_weak_ssl_version(host, port, timeout)
192194
cipher_suite, weak_cipher_suite = is_weak_cipher_suite(host, port, timeout)

0 commit comments

Comments
 (0)