def validate_certificate_host_ips(cert_pem_data, host_ips): cert = x509.load_pem_x509_certificate(cert_pem_data, default_backend()) for host_ip in host_ips: _match_subject_ip(cert, host_ip)