diff options
author | Stef Walter <stefw@gnome.org> | 2012-04-19 13:56:49 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-04-19 22:43:19 +0800 |
commit | b0de75186e8e529e427aae231b334a3e40e5bffd (patch) | |
tree | 52897c323888ffd56eef648b10d26f7a92da9924 /libempathy/empathy-tls-verifier.c | |
parent | 7c25066261498dd98fb6bd1260ffe12f2fb5b7ce (diff) | |
download | gsoc2013-empathy-b0de75186e8e529e427aae231b334a3e40e5bffd.tar gsoc2013-empathy-b0de75186e8e529e427aae231b334a3e40e5bffd.tar.gz gsoc2013-empathy-b0de75186e8e529e427aae231b334a3e40e5bffd.tar.bz2 gsoc2013-empathy-b0de75186e8e529e427aae231b334a3e40e5bffd.tar.lz gsoc2013-empathy-b0de75186e8e529e427aae231b334a3e40e5bffd.tar.xz gsoc2013-empathy-b0de75186e8e529e427aae231b334a3e40e5bffd.tar.zst gsoc2013-empathy-b0de75186e8e529e427aae231b334a3e40e5bffd.zip |
tls-test: Use a proper PKCS#11 mock module for testing
* In empathy-tls-test.c use a proper PKCS#11 mock module,
which we can place certificate anchors and pinned certificates in.
* Fix EmpathyTlsVerifier to check for server trust assertions
not client ones, this was a bug highlighted by fixing tests.
https://bugzilla.gnome.org/show_bug.cgi?id=668186
https://bugzilla.gnome.org/show_bug.cgi?id=668261
Diffstat (limited to 'libempathy/empathy-tls-verifier.c')
-rw-r--r-- | libempathy/empathy-tls-verifier.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libempathy/empathy-tls-verifier.c b/libempathy/empathy-tls-verifier.c index 2f20ca8e3..dbf083dba 100644 --- a/libempathy/empathy-tls-verifier.c +++ b/libempathy/empathy-tls-verifier.c @@ -531,7 +531,7 @@ empathy_tls_verifier_verify_async (EmpathyTLSVerifier *self, g_object_unref (cert); } - gcr_certificate_chain_build_async (chain, GCR_PURPOSE_CLIENT_AUTH, priv->hostname, 0, + gcr_certificate_chain_build_async (chain, GCR_PURPOSE_SERVER_AUTH, priv->hostname, 0, NULL, perform_verification_cb, g_object_ref (self)); g_object_unref (chain); @@ -595,7 +595,7 @@ empathy_tls_verifier_store_exception (EmpathyTLSVerifier *self) DEBUG ("Storing pinned certificate:"); debug_certificate (cert); - if (!gcr_trust_add_pinned_certificate (cert, GCR_PURPOSE_CLIENT_AUTH, + if (!gcr_trust_add_pinned_certificate (cert, GCR_PURPOSE_SERVER_AUTH, priv->hostname, NULL, &error)) DEBUG ("Can't store the pinned certificate: %s", error->message); |