Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test invalid certificate fingerprints

  • Loading branch information...
commit 866280e77fa4d74c3a69370728fa463ff750c561 1 parent 3d3e32d
@t-8ch t-8ch authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/with_dummyserver/test_https.py
View
12 test/with_dummyserver/test_https.py
@@ -174,6 +174,18 @@ def test_assert_invalid_fingerprint(self):
self.assertRaises(SSLError,
https_pool.request, 'GET', '/')
+ # invalid length
+ https_pool.assert_fingerprint = 'AA'
+
+ self.assertRaises(SSLError,
+ https_pool.request, 'GET', '/')
+
+ # uneven length
+ https_pool.assert_fingerprint = 'AA:A'
+
+ self.assertRaises(SSLError,
+ https_pool.request, 'GET', '/')
+
if __name__ == '__main__':
unittest.main()
Please sign in to comment.
Something went wrong with that request. Please try again.