use cert commonNames for endpoints to work around InvalidCertificateException