summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/headers/tomcrypt_custom.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2007-02-22 14:53:49 +0000
committerMatt Johnston <matt@ucc.asn.au>2007-02-22 14:53:49 +0000
commitb01a74a9d757ce2b83465214bde1fa07d3e2d3ea (patch)
tree092cac6797947f7b23fcdcc2c081b19c390c5bc4 /libtomcrypt/src/headers/tomcrypt_custom.h
parent66643fa5c723da2dc781c5eeae2e008c280a7b1c (diff)
parent7f12251fbb2acefac04e13a7c6a95ca4dd4b5578 (diff)
merge of 'a9b0496634cdd25647b65e585cc3240f3fa699ee'
and 'c22be8b8f570b48e9662dac32c7b3e7148a42206' --HG-- extra : convert_revision : 066f6aef2791d54b9ec6a0c3033fd28fa946251f
Diffstat (limited to 'libtomcrypt/src/headers/tomcrypt_custom.h')
-rw-r--r--libtomcrypt/src/headers/tomcrypt_custom.h70
1 files changed, 63 insertions, 7 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_custom.h b/libtomcrypt/src/headers/tomcrypt_custom.h
index ad61f52..440168b 100644
--- a/libtomcrypt/src/headers/tomcrypt_custom.h
+++ b/libtomcrypt/src/headers/tomcrypt_custom.h
@@ -5,27 +5,74 @@
#include "options.h"
/* macros for various libc functions you can change for embedded targets */
+#ifndef XMALLOC
+ #ifdef malloc
+ #define LTC_NO_PROTOTYPES
+ #endif
#define XMALLOC malloc
+#endif
+#ifndef XREALLOC
+ #ifdef realloc
+ #define LTC_NO_PROTOTYPES
+ #endif
#define XREALLOC realloc
+#endif
+#ifndef XCALLOC
+ #ifdef calloc
+ #define LTC_NO_PROTOTYPES
+ #endif
#define XCALLOC calloc
+#endif
+#ifndef XFREE
+ #ifdef free
+ #define LTC_NO_PROTOTYPES
+ #endif
#define XFREE free
+#endif
+#ifndef XMEMSET
+ #ifdef memset
+ #define LTC_NO_PROTOTYPES
+ #endif
#define XMEMSET memset
+#endif
+#ifndef XMEMCPY
+ #ifdef memcpy
+ #define LTC_NO_PROTOTYPES
+ #endif
#define XMEMCPY memcpy
+#endif
+#ifndef XMEMCMP
+ #ifdef memcmp
+ #define LTC_NO_PROTOTYPES
+ #endif
+#define XMEMCMP memcmp
+#endif
+#ifndef XSTRCMP
+ #ifdef strcmp
+ #define LTC_NO_PROTOTYPES
+ #endif
+#define XSTRCMP strcmp
+#endif
+#ifndef XCLOCK
#define XCLOCK clock
+#endif
+#ifndef XCLOCKS_PER_SEC
#define XCLOCKS_PER_SEC CLOCKS_PER_SEC
+#endif
+ #define LTC_NO_PRNGS
+ #define LTC_NO_PK
#ifdef DROPBEAR_SMALL_CODE
#define LTC_SMALL_CODE
#endif
-
/* These spit out warnings etc */
#define LTC_NO_ROLC
/* Enable self-test test vector checking */
/* Not for dropbear */
-//#define LTC_TEST
+/*#define LTC_TEST*/
/* clean the stack of functions which put private information on stack */
/* #define LTC_CLEAN_STACK */
@@ -64,7 +111,8 @@
#ifdef DROPBEAR_3DES_CBC
#define DES
#endif
-#define CBC
+
+#define LTC_CBC_MODE
#if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
#define SHA512
@@ -76,21 +124,29 @@
#define MD5
#endif
-#define HMAC
+#define LTC_HMAC
/* Various tidbits of modern neatoness */
#define BASE64
-/* default no functions */
+/* default no pthread functions */
#define LTC_MUTEX_GLOBAL(x)
#define LTC_MUTEX_PROTO(x)
+#define LTC_MUTEX_TYPE(x)
+#define LTC_MUTEX_INIT(x)
#define LTC_MUTEX_LOCK(x)
#define LTC_MUTEX_UNLOCK(x)
#define FORTUNA_POOLS 0
+/* Debuggers */
+
+/* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and RC4 work (see the code) */
+/* #define LTC_VALGRIND */
+
#endif
+
/* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_custom.h,v $ */
-/* $Revision: 1.17 $ */
-/* $Date: 2005/06/19 18:00:28 $ */
+/* $Revision: 1.66 $ */
+/* $Date: 2006/12/04 02:50:11 $ */