aboutsummaryrefslogtreecommitdiff
path: root/networking/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'networking/tls.h')
-rw-r--r--networking/tls.h41
1 files changed, 33 insertions, 8 deletions
diff --git a/networking/tls.h b/networking/tls.h
index 3a8a3d826..5a0cb67e9 100644
--- a/networking/tls.h
+++ b/networking/tls.h
@@ -3,17 +3,40 @@
3 * 3 *
4 * Licensed under GPLv2, see file LICENSE in this source tree. 4 * Licensed under GPLv2, see file LICENSE in this source tree.
5 */ 5 */
6/* Interface glue between bbox code and minimally tweaked matrixssl
7 * code. All C files (matrixssl and bbox (ones which need TLS))
8 * include this file, and guaranteed to see a consistent API,
9 * defines, types, etc.
10 */
6#include "libbb.h" 11#include "libbb.h"
7 12
8/* config tweaks */ 13
9#define HAVE_NATIVE_INT64 1 14/* Config tweaks */
10#undef DISABLE_PSTM 15#define HAVE_NATIVE_INT64
11#undef USE_1024_KEY_SPEED_OPTIMIZATIONS 16#undef USE_1024_KEY_SPEED_OPTIMIZATIONS
12#undef USE_2048_KEY_SPEED_OPTIMIZATIONS 17#undef USE_2048_KEY_SPEED_OPTIMIZATIONS
13//TODO: enable to use asm: 18#define USE_AES
14//#if defined(__GNUC__) && defined(__i386__) -> #define PSTM_32BIT and PSTM_X86 19#undef USE_AES_CBC_EXTERNAL
15//#if defined(__GNUC__) && defined(__x86_64__) -> #define PSTM_64BIT and PSTM_X86_64 20#undef USE_AES_CCM
16//ARM and MIPS also have these 21#undef USE_AES_GCM
22#undef USE_3DES
23#undef USE_ARC4
24#undef USE_IDEA
25#undef USE_RC2
26#undef USE_SEED
27/* pstm: multiprecision numbers */
28#undef DISABLE_PSTM
29#if defined(__GNUC__) && defined(__i386__)
30# define PSTM_32BIT
31# define PSTM_X86
32#endif
33//test this before enabling:
34//#if defined(__GNUC__) && defined(__x86_64__)
35//# define PSTM_64BIT
36//# define PSTM_X86_64
37//#endif
38//#if SOME_COND #define PSTM_MIPS, #define PSTM_32BIT
39//#if SOME_COND #define PSTM_ARM, #define PSTM_32BIT
17 40
18 41
19#define PS_SUCCESS 0 42#define PS_SUCCESS 0
@@ -65,9 +88,11 @@ void tls_get_random(void *buf, unsigned len);
65#define memset_s(A,B,C,D) memset((A),(C),(D)) 88#define memset_s(A,B,C,D) memset((A),(C),(D))
66/* Constant time memory comparison */ 89/* Constant time memory comparison */
67#define memcmpct(s1, s2, len) memcmp((s1), (s2), (len)) 90#define memcmpct(s1, s2, len) memcmp((s1), (s2), (len))
68#undef min 91#undef min
69#define min(x, y) ((x) < (y) ? (x) : (y)) 92#define min(x, y) ((x) < (y) ? (x) : (y))
70 93
71 94
72#include "tls_pstm.h" 95#include "tls_pstm.h"
73#include "tls_rsa.h" 96#include "tls_rsa.h"
97#include "tls_symmetric.h"
98#include "tls_aes.h"