aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-28 13:57:23 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-28 14:40:25 -0400
commita742a826f6fe4eafef047c4dd7ca7fa899d2f823 (patch)
tree7c83b2c177eeac4630736ed010266e6bcd36ebb3 /src/lib/tls/tortls.c
parent0f02d2c0411448668d2dfe11b61e1ea72ee7a3b2 (diff)
downloadtor-a742a826f6fe4eafef047c4dd7ca7fa899d2f823.tar.gz
tor-a742a826f6fe4eafef047c4dd7ca7fa899d2f823.zip
Remove all include common/ uses in crypto_ops and tls.
Diffstat (limited to 'src/lib/tls/tortls.c')
-rw-r--r--src/lib/tls/tortls.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/tls/tortls.c b/src/lib/tls/tortls.c
index 6fa0611f1d..3eee41bd16 100644
--- a/src/lib/tls/tortls.c
+++ b/src/lib/tls/tortls.c
@@ -28,7 +28,6 @@
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "common/compat.h"
/* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in
* srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */
@@ -53,11 +52,21 @@ ENABLE_GCC_WARNING(redundant-decls)
#define TORTLS_PRIVATE
#include "lib/tls/tortls.h"
-#include "common/util.h"
#include "lib/log/torlog.h"
+#include "lib/log/util_bug.h"
#include "lib/container/smartlist.h"
+#include "lib/string/compat_string.h"
+#include "lib/string/printf.h"
+#include "lib/net/socket.h"
+#include "lib/intmath/cmp.h"
+#include "lib/ctime/di_ops.h"
+#include "lib/encoding/time_fmt.h"
+
+#include <stdlib.h>
#include <string.h>
+#include "lib/arch/bytes.h"
+
#ifdef OPENSSL_1_1_API
#define X509_get_notBefore_const(cert) \
X509_get0_notBefore(cert)
@@ -1392,7 +1401,7 @@ find_cipher_by_id(const SSL *ssl, const SSL_METHOD *m, uint16_t cipher)
{
unsigned char cipherid[3];
tor_assert(ssl);
- set_uint16(cipherid, htons(cipher));
+ set_uint16(cipherid, tor_htons(cipher));
cipherid[2] = 0; /* If ssl23_get_cipher_by_char finds no cipher starting
* with a two-byte 'cipherid', it may look for a v2
* cipher with the appropriate 3 bytes. */
@@ -1406,7 +1415,7 @@ find_cipher_by_id(const SSL *ssl, const SSL_METHOD *m, uint16_t cipher)
# if defined(HAVE_STRUCT_SSL_METHOD_ST_GET_CIPHER_BY_CHAR)
if (m && m->get_cipher_by_char) {
unsigned char cipherid[3];
- set_uint16(cipherid, htons(cipher));
+ set_uint16(cipherid, tor_htons(cipher));
cipherid[2] = 0; /* If ssl23_get_cipher_by_char finds no cipher starting
* with a two-byte 'cipherid', it may look for a v2
* cipher with the appropriate 3 bytes. */