aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-10-08 15:39:34 -0400
committerNick Mathewson <nickm@torproject.org>2015-05-28 10:41:50 -0400
commitb75361c5ed717cde787c1b4f36e8fb51ccfddc2b (patch)
treeab7eabd383a6b83ffcbdd6bf2f6e19d222ae4681 /src/common/tortls.c
parentdf05e195ee64d7ed1b5a1b5d74c5868683788ba2 (diff)
downloadtor-b75361c5ed717cde787c1b4f36e8fb51ccfddc2b.tar.gz
tor-b75361c5ed717cde787c1b4f36e8fb51ccfddc2b.zip
Start testing cell encoders/processers for the v3 handshake.
An earlier version of these tests was broken; now they're a nicer, more robust, more black-box set of tests. The key is to have each test check a handshake message that is wrong in _one_ way.
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 97dca4d478..62e32c5dae 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -1023,8 +1023,8 @@ tor_tls_cert_get_key(tor_x509_cert_t *cert)
/** Return true iff the other side of <b>tls</b> has authenticated to us, and
* the key certified in <b>cert</b> is the same as the key they used to do it.
*/
-int
-tor_tls_cert_matches_key(const tor_tls_t *tls, const tor_x509_cert_t *cert)
+MOCK_IMPL(int,
+tor_tls_cert_matches_key,(const tor_tls_t *tls, const tor_x509_cert_t *cert))
{
X509 *peercert = SSL_get_peer_certificate(tls->ssl);
EVP_PKEY *link_key = NULL, *cert_key = NULL;