aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-17 11:23:53 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-31 19:46:00 -0400
commit32bbc8f6b5e7d964439c6ba91f87f7d5fba673cc (patch)
tree7256e656df93d19212427ac9ab30bbc6715dd3b3 /src/lib/tls
parentac9a470c641fd3ba826cdad07b1a7a495c00acba (diff)
downloadtor-32bbc8f6b5e7d964439c6ba91f87f7d5fba673cc.tar.gz
tor-32bbc8f6b5e7d964439c6ba91f87f7d5fba673cc.zip
Refactor the dependency between tortls and crypto_dh.
We only ever need this to get us a DH ephemeral key object, so make a function that does just that.
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/tortls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/tls/tortls.c b/src/lib/tls/tortls.c
index 8d284dde17..875ed95f8c 100644
--- a/src/lib/tls/tortls.c
+++ b/src/lib/tls/tortls.c
@@ -1280,10 +1280,10 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime,
goto error;
}
{
- crypto_dh_t *dh = crypto_dh_new(DH_TYPE_TLS);
+ DH *dh = crypto_dh_new_openssl_tls();
tor_assert(dh);
- SSL_CTX_set_tmp_dh(result->ctx, crypto_dh_get_dh_(dh));
- crypto_dh_free(dh);
+ SSL_CTX_set_tmp_dh(result->ctx, dh);
+ DH_free(dh);
}
if (! is_client) {
int nid;