From: Guus Sliepen Date: Mon, 21 Apr 2014 21:29:36 +0000 (+0200) Subject: Really stop using cipher.h and digest.h. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=5216839fa30dfbf5204b274b4e8becbb34e6ca21;p=meshlink Really stop using cipher.h and digest.h. --- 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"