]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
tools/checkcerts.py: apparently SSLError is also possible, catch 725/head
authorDan Mick <dmick@redhat.com>
Sat, 1 Apr 2023 20:04:54 +0000 (13:04 -0700)
committerDan Mick <dmick@redhat.com>
Sat, 1 Apr 2023 20:04:54 +0000 (13:04 -0700)
Signed-off-by: Dan Mick <dmick@redhat.com>
tools/checkcerts.py

index 901be3636155501d7a19da6666c82e0a9ef19dbd..e9de5790b7c03436c4086f8972d1d5cd026c4c67 100755 (executable)
@@ -89,7 +89,7 @@ def main():
             with socket.create_connection((domain, 443)) as sock:
                 with context.wrap_socket(sock, server_hostname=domain) as ssock:
                     cert = ssock.getpeercert()
-        except ssl.CertificateError as e:
+        except (ssl.CertificateError, ssl.SSLError) as e:
             print(f'{domain} cert error: {e}', file=sys.stderr)
             continue
         expire = datetime.datetime.strptime(cert['notAfter'],