From 5216839fa30dfbf5204b274b4e8becbb34e6ca21 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 21 Apr 2014 23:29:36 +0200 Subject: [PATCH] Really stop using cipher.h and digest.h. --- src/chacha-poly1305/chacha-poly1305.c | 1 - src/connection.c | 1 - src/connection.h | 2 -- src/meta.c | 1 - src/net.h | 6 ++---- src/net_packet.c | 2 -- src/net_setup.c | 2 -- src/protocol_auth.c | 3 --- src/protocol_key.c | 2 -- 9 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/chacha-poly1305/chacha-poly1305.c b/src/chacha-poly1305/chacha-poly1305.c index bd5cb2c4..c7464203 100644 --- a/src/chacha-poly1305/chacha-poly1305.c +++ b/src/chacha-poly1305/chacha-poly1305.c @@ -1,6 +1,5 @@ #include "../system.h" -#include "../cipher.h" #include "../xalloc.h" #include "chacha.h" diff --git a/src/connection.c b/src/connection.c index 1732b150..3db7a271 100644 --- a/src/connection.c +++ b/src/connection.c @@ -20,7 +20,6 @@ #include "system.h" #include "list.h" -#include "cipher.h" #include "conf.h" #include "connection.h" #include "list.h" diff --git a/src/connection.h b/src/connection.h index 181de823..d4169bcc 100644 --- a/src/connection.h +++ b/src/connection.h @@ -21,8 +21,6 @@ #define __TINC_CONNECTION_H__ #include "buffer.h" -#include "cipher.h" -#include "digest.h" #include "list.h" #include "sptps.h" diff --git a/src/meta.c b/src/meta.c index 160333b2..14342608 100644 --- a/src/meta.c +++ b/src/meta.c @@ -19,7 +19,6 @@ #include "system.h" -#include "cipher.h" #include "connection.h" #include "logger.h" #include "meshlink_internal.h" diff --git a/src/net.h b/src/net.h index 06797446..33d27359 100644 --- a/src/net.h +++ b/src/net.h @@ -20,8 +20,6 @@ #ifndef __TINC_NET_H__ #define __TINC_NET_H__ -#include "cipher.h" -#include "digest.h" #include "event.h" #include "sockaddr.h" @@ -31,8 +29,8 @@ #define MTU 1518 /* 1500 bytes payload + 14 bytes ethernet header + 4 bytes VLAN tag */ #endif -/* MAXSIZE is the maximum size of an encapsulated packet: MTU + seqno + padding + HMAC + compressor overhead */ -#define MAXSIZE (MTU + 4 + CIPHER_MAX_BLOCK_SIZE + DIGEST_MAX_SIZE + MTU/64 + 20) +/* MAXSIZE is the maximum size of an encapsulated packet: MTU + seqno + HMAC + compressor overhead */ +#define MAXSIZE (MTU + 4 + 32 + MTU/64 + 20) /* MAXBUFSIZE is the maximum size of a request: enough for a MAXSIZEd packet or a 8192 bits RSA key */ #define MAXBUFSIZE ((MAXSIZE > 2048 ? MAXSIZE : 2048) + 128) diff --git a/src/net_packet.c b/src/net_packet.c index a8c8b036..d231c231 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -23,11 +23,9 @@ #include #endif -#include "cipher.h" #include "conf.h" #include "connection.h" #include "crypto.h" -#include "digest.h" #include "graph.h" #include "logger.h" #include "meshlink_internal.h" diff --git a/src/net_setup.c b/src/net_setup.c index b6d88da3..decaaaa4 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -19,10 +19,8 @@ #include "system.h" -#include "cipher.h" #include "conf.h" #include "connection.h" -#include "digest.h" #include "ecdsa.h" #include "graph.h" #include "logger.h" diff --git a/src/protocol_auth.c b/src/protocol_auth.c index bd1c1c47..3bd444ea 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -21,9 +21,6 @@ #include "conf.h" #include "connection.h" -#include "cipher.h" -#include "crypto.h" -#include "digest.h" #include "ecdsa.h" #include "edge.h" #include "graph.h" diff --git a/src/protocol_key.c b/src/protocol_key.c index 59ca7db4..8ab1325c 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -19,9 +19,7 @@ #include "system.h" -#include "cipher.h" #include "connection.h" -#include "crypto.h" #include "logger.h" #include "meshlink_internal.h" #include "net.h" -- 2.39.2