summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2017-03-20 19:31:39 +0100
committerDebarshi Ray <debarshir@gnome.org>2017-03-20 19:32:08 +0100
commit05d86a3f6e599207918a8d5b871bc3a89660dbab (patch)
tree2f9b1f06e4761a387a887fd97cf0980cba6bfd4c
parent5cdb6ee13b5c82283c93477af29eca2dd2ee28eb (diff)
downloadempathy-05d86a3f6e599207918a8d5b871bc3a89660dbab.tar.gz
tests: Actually test that hostnames of pinned certificates are verified
This test case is about ensuring that a pinned certificate won't be validated if the wrong hostname is used. If we don't add the pinned certificate to our database, then checks for pinning are going to fail regardless of the hostname being used. The correct certificate-hostname pair needs to be in the database to ensure that the hostnames are being matched as advertised. https://bugzilla.gnome.org/show_bug.cgi?id=780160
-rw-r--r--tests/empathy-tls-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/empathy-tls-test.c b/tests/empathy-tls-test.c
index 0752e1b32..422909e7c 100644
--- a/tests/empathy-tls-test.c
+++ b/tests/empathy-tls-test.c
@@ -695,7 +695,8 @@ test_certificate_verify_pinned_wrong_host (Test *test,
test->mock = mock_tls_certificate_new_and_register (test->dbus,
"server-cert.cer", NULL);
- /* Note that we're not adding any place to find root certs */
+ /* We add the collabora directory with the collabora root */
+ add_certificate_to_mock (test, "server-cert.cer", "test-server.empathy.gnome.org");
ensure_certificate_proxy (test);