aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-06-01 08:55:54 -0400
committerNick Mathewson <nickm@torproject.org>2017-06-05 15:27:33 -0400
commit39b7e89c28efda628d57640302276b7f04b2c0de (patch)
treeb382c12c6e945696d7a1fb243109d7769e8b9f41 /src/common/tortls.h
parent50facb40bb42e070b858ca052edccd0f3a5b83b5 (diff)
downloadtor-39b7e89c28efda628d57640302276b7f04b2c0de.tar.gz
tor-39b7e89c28efda628d57640302276b7f04b2c0de.zip
Test prerequisites: function to dup a cert, make get_own_cert mockable.
Diffstat (limited to 'src/common/tortls.h')
-rw-r--r--src/common/tortls.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/tortls.h b/src/common/tortls.h
index ae11b7ab60..f018c45c82 100644
--- a/src/common/tortls.h
+++ b/src/common/tortls.h
@@ -197,8 +197,9 @@ void tor_tls_set_renegotiate_callback(tor_tls_t *tls,
int tor_tls_is_server(tor_tls_t *tls);
void tor_tls_free(tor_tls_t *tls);
int tor_tls_peer_has_cert(tor_tls_t *tls);
+tor_x509_cert_t *tor_x509_cert_dup(const tor_x509_cert_t *cert);
MOCK_DECL(tor_x509_cert_t *,tor_tls_get_peer_cert,(tor_tls_t *tls));
-tor_x509_cert_t *tor_tls_get_own_cert(tor_tls_t *tls);
+MOCK_DECL(tor_x509_cert_t *,tor_tls_get_own_cert,(tor_tls_t *tls));
int tor_tls_verify(int severity, tor_tls_t *tls, crypto_pk_t **identity);
int tor_tls_check_lifetime(int severity,
tor_tls_t *tls, int past_tolerance,