Fix issue with not matching on first host in cert list. Add unit tests.
diff --git a/python2/httplib2test.py b/python2/httplib2test.py
index bb9a32c..2869b6b 100755
--- a/python2/httplib2test.py
+++ b/python2/httplib2test.py
@@ -482,6 +482,14 @@
self.assertRaises(httplib2.SSLHandshakeError,
http.request, "https://www.google.com/", "GET")
+ def testSslCertValidationDoubleDots(self):
+ if sys.version_info >= (2, 6):
+ # Test that we get match a double dot cert
+ try:
+ self.http.request("https://1.www.appspot.com/", "GET")
+ except httplib2.CertificateHostnameMismatch:
+ self.fail('cert with *.*.appspot.com should not raise an exception.')
+
def testSslHostnameValidation(self):
if sys.version_info >= (2, 6):
# The SSL server at google.com:443 returns a certificate for