cyassl re-port with cellular comms, PSK test

Dependencies:   VodafoneUSBModem_bleedingedge2 mbed-rtos mbed-src

Committer:
ashleymills
Date:
Fri Apr 26 16:59:36 2013 +0000
Revision:
1:b211d97b0068
Parent:
0:e979170e02e7
nothing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ashleymills 0:e979170e02e7 1 /* settings.h
ashleymills 0:e979170e02e7 2 *
ashleymills 0:e979170e02e7 3 * Copyright (C) 2006-2012 Sawtooth Consulting Ltd.
ashleymills 0:e979170e02e7 4 *
ashleymills 0:e979170e02e7 5 * This file is part of CyaSSL.
ashleymills 0:e979170e02e7 6 *
ashleymills 0:e979170e02e7 7 * CyaSSL is free software; you can redistribute it and/or modify
ashleymills 0:e979170e02e7 8 * it under the terms of the GNU General Public License as published by
ashleymills 0:e979170e02e7 9 * the Free Software Foundation; either version 2 of the License, or
ashleymills 0:e979170e02e7 10 * (at your option) any later version.
ashleymills 0:e979170e02e7 11 *
ashleymills 0:e979170e02e7 12 * CyaSSL is distributed in the hope that it will be useful,
ashleymills 0:e979170e02e7 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ashleymills 0:e979170e02e7 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ashleymills 0:e979170e02e7 15 * GNU General Public License for more details.
ashleymills 0:e979170e02e7 16 *
ashleymills 0:e979170e02e7 17 * You should have received a copy of the GNU General Public License
ashleymills 0:e979170e02e7 18 * along with this program; if not, write to the Free Software
ashleymills 0:e979170e02e7 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
ashleymills 0:e979170e02e7 20 */
ashleymills 0:e979170e02e7 21
ashleymills 0:e979170e02e7 22 /* Place OS specific preprocessor flags, defines, includes here, will be
ashleymills 0:e979170e02e7 23 included into every file because types.h includes it */
ashleymills 0:e979170e02e7 24
ashleymills 0:e979170e02e7 25
ashleymills 0:e979170e02e7 26 #ifndef CTAO_CRYPT_SETTINGS_H
ashleymills 0:e979170e02e7 27 #define CTAO_CRYPT_SETTINGS_H
ashleymills 0:e979170e02e7 28
ashleymills 0:e979170e02e7 29 #ifdef __cplusplus
ashleymills 0:e979170e02e7 30 extern "C" {
ashleymills 0:e979170e02e7 31 #endif
ashleymills 0:e979170e02e7 32
ashleymills 0:e979170e02e7 33 /* Uncomment next line if using IPHONE */
ashleymills 0:e979170e02e7 34 /* #define IPHONE */
ashleymills 0:e979170e02e7 35
ashleymills 0:e979170e02e7 36 /* Uncomment next line if using ThreadX */
ashleymills 0:e979170e02e7 37 /* #define THREADX */
ashleymills 0:e979170e02e7 38
ashleymills 0:e979170e02e7 39 /* Uncomment next line if using Micrium ucOS */
ashleymills 0:e979170e02e7 40 /* #define MICRIUM */
ashleymills 0:e979170e02e7 41
ashleymills 0:e979170e02e7 42 /* Uncomment next line if using Mbed */
ashleymills 0:e979170e02e7 43 #define MBED
ashleymills 0:e979170e02e7 44
ashleymills 0:e979170e02e7 45 /* Uncomment next line if using Microchip PIC32 ethernet starter kit */
ashleymills 0:e979170e02e7 46 /* #define MICROCHIP_PIC32 */
ashleymills 0:e979170e02e7 47
ashleymills 0:e979170e02e7 48 /* Uncomment next line if using FreeRTOS */
ashleymills 0:e979170e02e7 49 /* #define FREERTOS */
ashleymills 0:e979170e02e7 50
ashleymills 0:e979170e02e7 51 /* Uncomment next line if using FreeRTOS Windows Simulator */
ashleymills 0:e979170e02e7 52 /* #define FREERTOS_WINSIM */
ashleymills 0:e979170e02e7 53
ashleymills 0:e979170e02e7 54 /* Uncomment next line if using RTIP */
ashleymills 0:e979170e02e7 55 /* #define EBSNET */
ashleymills 0:e979170e02e7 56
ashleymills 0:e979170e02e7 57 /* Uncomment next line if using lwip */
ashleymills 0:e979170e02e7 58 #define CYASSL_LWIP
ashleymills 0:e979170e02e7 59
ashleymills 0:e979170e02e7 60 /* Uncomment next line if building CyaSSL for a game console */
ashleymills 0:e979170e02e7 61 /* #define CYASSL_GAME_BUILD */
ashleymills 0:e979170e02e7 62
ashleymills 0:e979170e02e7 63 /* Uncomment next line if building CyaSSL for LSR */
ashleymills 0:e979170e02e7 64 /* #define CYASSL_LSR */
ashleymills 0:e979170e02e7 65
ashleymills 0:e979170e02e7 66 /* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
ashleymills 0:e979170e02e7 67 /* #define FREESCALE_MQX */
ashleymills 0:e979170e02e7 68
ashleymills 0:e979170e02e7 69 /* Uncomment next line if using STM32F2 */
ashleymills 0:e979170e02e7 70 /* #define CYASSL_STM32F2 */
ashleymills 0:e979170e02e7 71
ashleymills 0:e979170e02e7 72
ashleymills 0:e979170e02e7 73 #include <cyassl/ctaocrypt/visibility.h>
ashleymills 0:e979170e02e7 74
ashleymills 0:e979170e02e7 75 /* stream ciphers except arc4 need 32bit alignment, intel ok without */
ashleymills 0:e979170e02e7 76 #if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
ashleymills 0:e979170e02e7 77 #define NO_XSTREAM_ALIGNMENT
ashleymills 0:e979170e02e7 78 #else
ashleymills 0:e979170e02e7 79 #define XSTREAM_ALIGNMENT
ashleymills 0:e979170e02e7 80 #endif
ashleymills 0:e979170e02e7 81
ashleymills 0:e979170e02e7 82 #ifdef IPHONE
ashleymills 0:e979170e02e7 83 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 84 #endif
ashleymills 0:e979170e02e7 85
ashleymills 0:e979170e02e7 86 #ifdef THREADX
ashleymills 0:e979170e02e7 87 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 88 #endif
ashleymills 0:e979170e02e7 89
ashleymills 0:e979170e02e7 90 #ifdef MICROCHIP_PIC32
ashleymills 0:e979170e02e7 91 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 92 #define SINGLE_THREADED
ashleymills 0:e979170e02e7 93 #define CYASSL_USER_IO
ashleymills 0:e979170e02e7 94 #define NO_WRITEV
ashleymills 0:e979170e02e7 95 #define NO_DEV_RANDOM
ashleymills 0:e979170e02e7 96 #define NO_FILESYSTEM
ashleymills 0:e979170e02e7 97 #define USE_FAST_MATH
ashleymills 0:e979170e02e7 98 #define TFM_TIMING_RESISTANT
ashleymills 0:e979170e02e7 99 #endif
ashleymills 0:e979170e02e7 100
ashleymills 0:e979170e02e7 101 #ifdef MBED
ashleymills 0:e979170e02e7 102 #define SINGLE_THREADED
ashleymills 0:e979170e02e7 103 //#define CYASSL_USER_IO
ashleymills 0:e979170e02e7 104 #define NO_WRITEV
ashleymills 0:e979170e02e7 105 #define NO_DEV_RANDOM
ashleymills 0:e979170e02e7 106 #define NO_SHA512
ashleymills 0:e979170e02e7 107 #define NO_DH
ashleymills 0:e979170e02e7 108 #define NO_DSA
ashleymills 0:e979170e02e7 109 //#define NO_RSA
ashleymills 0:e979170e02e7 110 #define NO_HC128
ashleymills 0:e979170e02e7 111 #define NO_FILESYSTEM
ashleymills 0:e979170e02e7 112 #define DEBUG_CYASSL
ashleymills 0:e979170e02e7 113 //#define NO_CERTS
ashleymills 0:e979170e02e7 114 //#define SSL_CFG_PSK_EN
ashleymills 0:e979170e02e7 115 #endif /* MBED */
ashleymills 0:e979170e02e7 116
ashleymills 0:e979170e02e7 117 #ifdef FREERTOS_WINSIM
ashleymills 0:e979170e02e7 118 #define FREERTOS
ashleymills 0:e979170e02e7 119 #define USE_WINDOWS_API
ashleymills 0:e979170e02e7 120 #endif
ashleymills 0:e979170e02e7 121
ashleymills 0:e979170e02e7 122
ashleymills 0:e979170e02e7 123 #ifdef CYASSL_LEANPSK
ashleymills 0:e979170e02e7 124 #include <stdlib.h>
ashleymills 0:e979170e02e7 125 #define XMALLOC(s, h, type) malloc((s))
ashleymills 0:e979170e02e7 126 #define XFREE(p, h, type) free((p))
ashleymills 0:e979170e02e7 127 #define XREALLOC(p, n, h, t) realloc((p), (n))
ashleymills 0:e979170e02e7 128 #endif
ashleymills 0:e979170e02e7 129
ashleymills 0:e979170e02e7 130
ashleymills 0:e979170e02e7 131 #ifdef FREERTOS
ashleymills 0:e979170e02e7 132 #define NO_WRITEV
ashleymills 0:e979170e02e7 133 #define NO_SHA512
ashleymills 0:e979170e02e7 134 #define NO_DH
ashleymills 0:e979170e02e7 135 #define NO_DSA
ashleymills 0:e979170e02e7 136 #define NO_HC128
ashleymills 0:e979170e02e7 137
ashleymills 0:e979170e02e7 138 #ifndef SINGLE_THREADED
ashleymills 0:e979170e02e7 139 #include "FreeRTOS.h"
ashleymills 0:e979170e02e7 140 #include "semphr.h"
ashleymills 0:e979170e02e7 141 #endif
ashleymills 0:e979170e02e7 142 #endif
ashleymills 0:e979170e02e7 143
ashleymills 0:e979170e02e7 144 #ifdef EBSNET
ashleymills 0:e979170e02e7 145 #include "rtip.h"
ashleymills 0:e979170e02e7 146
ashleymills 0:e979170e02e7 147 /* #define DEBUG_CYASSL */
ashleymills 0:e979170e02e7 148 #define NO_CYASSL_DIR /* tbd */
ashleymills 0:e979170e02e7 149
ashleymills 0:e979170e02e7 150 #if (POLLOS)
ashleymills 0:e979170e02e7 151 #define SINGLE_THREADED
ashleymills 0:e979170e02e7 152 #endif
ashleymills 0:e979170e02e7 153
ashleymills 0:e979170e02e7 154 #if (RTPLATFORM)
ashleymills 0:e979170e02e7 155 #if (!RTP_LITTLE_ENDIAN)
ashleymills 0:e979170e02e7 156 #define BIG_ENDIAN_ORDER
ashleymills 0:e979170e02e7 157 #endif
ashleymills 0:e979170e02e7 158 #else
ashleymills 0:e979170e02e7 159 #if (!KS_LITTLE_ENDIAN)
ashleymills 0:e979170e02e7 160 #define BIG_ENDIAN_ORDER
ashleymills 0:e979170e02e7 161 #endif
ashleymills 0:e979170e02e7 162 #endif
ashleymills 0:e979170e02e7 163
ashleymills 0:e979170e02e7 164 #if (WINMSP3)
ashleymills 0:e979170e02e7 165 #undef SIZEOF_LONG
ashleymills 0:e979170e02e7 166 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 167 #else
ashleymills 0:e979170e02e7 168 #sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
ashleymills 0:e979170e02e7 169 #endif
ashleymills 0:e979170e02e7 170
ashleymills 0:e979170e02e7 171 #define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
ashleymills 0:e979170e02e7 172 #define XFREE(p, h, type) (rtp_free(p))
ashleymills 0:e979170e02e7 173 #define XREALLOC(p, n, h, t) realloc((p), (n))
ashleymills 0:e979170e02e7 174
ashleymills 0:e979170e02e7 175 #endif /* EBSNET */
ashleymills 0:e979170e02e7 176
ashleymills 0:e979170e02e7 177 #ifdef CYASSL_GAME_BUILD
ashleymills 0:e979170e02e7 178 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 179 #if defined(__PPU) || defined(__XENON)
ashleymills 0:e979170e02e7 180 #define BIG_ENDIAN_ORDER
ashleymills 0:e979170e02e7 181 #endif
ashleymills 0:e979170e02e7 182 #endif
ashleymills 0:e979170e02e7 183
ashleymills 0:e979170e02e7 184 #ifdef CYASSL_LSR
ashleymills 0:e979170e02e7 185 #define HAVE_WEBSERVER
ashleymills 0:e979170e02e7 186 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 187 #define CYASSL_LOW_MEMORY
ashleymills 0:e979170e02e7 188 #define NO_WRITEV
ashleymills 0:e979170e02e7 189 #define NO_SHA512
ashleymills 0:e979170e02e7 190 #define NO_DH
ashleymills 0:e979170e02e7 191 #define NO_DSA
ashleymills 0:e979170e02e7 192 #define NO_HC128
ashleymills 0:e979170e02e7 193 #define NO_DEV_RANDOM
ashleymills 0:e979170e02e7 194 #define NO_CYASSL_DIR
ashleymills 0:e979170e02e7 195 #define NO_RABBIT
ashleymills 0:e979170e02e7 196 #ifndef NO_FILESYSTEM
ashleymills 0:e979170e02e7 197 #define LSR_FS
ashleymills 0:e979170e02e7 198 #include "inc/hw_types.h"
ashleymills 0:e979170e02e7 199 #include "fs.h"
ashleymills 0:e979170e02e7 200 #endif
ashleymills 0:e979170e02e7 201 #define CYASSL_LWIP
ashleymills 0:e979170e02e7 202 #include <errno.h> /* for tcp errno */
ashleymills 0:e979170e02e7 203 #define CYASSL_SAFERTOS
ashleymills 0:e979170e02e7 204 #if defined(__IAR_SYSTEMS_ICC__)
ashleymills 0:e979170e02e7 205 /* enum uses enum */
ashleymills 0:e979170e02e7 206 #pragma diag_suppress=Pa089
ashleymills 0:e979170e02e7 207 #endif
ashleymills 0:e979170e02e7 208 #endif
ashleymills 0:e979170e02e7 209
ashleymills 0:e979170e02e7 210 #ifdef CYASSL_SAFERTOS
ashleymills 0:e979170e02e7 211 #ifndef SINGLE_THREADED
ashleymills 0:e979170e02e7 212 #include "SafeRTOS/semphr.h"
ashleymills 0:e979170e02e7 213 #endif
ashleymills 0:e979170e02e7 214
ashleymills 0:e979170e02e7 215 #include "SafeRTOS/heap.h"
ashleymills 0:e979170e02e7 216 #define XMALLOC(s, h, type) pvPortMalloc((s))
ashleymills 0:e979170e02e7 217 #define XFREE(p, h, type) vPortFree((p))
ashleymills 0:e979170e02e7 218 #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
ashleymills 0:e979170e02e7 219 #endif
ashleymills 0:e979170e02e7 220
ashleymills 0:e979170e02e7 221 #ifdef CYASSL_LOW_MEMORY
ashleymills 0:e979170e02e7 222 #define RSA_LOW_MEM
ashleymills 0:e979170e02e7 223 #define CYASSL_SMALL_STACK
ashleymills 0:e979170e02e7 224 #define TFM_TIMING_RESISTANT
ashleymills 0:e979170e02e7 225 #endif
ashleymills 0:e979170e02e7 226
ashleymills 0:e979170e02e7 227 #ifdef FREESCALE_MQX
ashleymills 0:e979170e02e7 228 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 229 #define NO_WRITEV
ashleymills 0:e979170e02e7 230 #define NO_DEV_RANDOM
ashleymills 0:e979170e02e7 231 #define NO_RABBIT
ashleymills 0:e979170e02e7 232 #define NO_CYASSL_DIR
ashleymills 0:e979170e02e7 233 #define USE_FAST_MATH
ashleymills 0:e979170e02e7 234 #define TFM_TIMING_RESISTANT
ashleymills 0:e979170e02e7 235 #define FREESCALE_K70_RNGA
ashleymills 0:e979170e02e7 236 #ifndef NO_FILESYSTEM
ashleymills 0:e979170e02e7 237 #include "mfs.h"
ashleymills 0:e979170e02e7 238 #include "fio.h"
ashleymills 0:e979170e02e7 239 #endif
ashleymills 0:e979170e02e7 240 #ifndef SINGLE_THREADED
ashleymills 0:e979170e02e7 241 #include "mutex.h"
ashleymills 0:e979170e02e7 242 #endif
ashleymills 0:e979170e02e7 243
ashleymills 0:e979170e02e7 244 #define XMALLOC(s, h, type) (void *)_mem_alloc_system((s))
ashleymills 0:e979170e02e7 245 #define XFREE(p, h, type) _mem_free(p)
ashleymills 0:e979170e02e7 246 /* Note: MQX has no realloc, using fastmath above */
ashleymills 0:e979170e02e7 247 #endif
ashleymills 0:e979170e02e7 248
ashleymills 0:e979170e02e7 249 #ifdef CYASSL_STM32F2
ashleymills 0:e979170e02e7 250 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 251 #define NO_DEV_RANDOM
ashleymills 0:e979170e02e7 252 #define NO_CYASSL_DIR
ashleymills 0:e979170e02e7 253 #define NO_RABBIT
ashleymills 0:e979170e02e7 254 #define STM32F2_RNG
ashleymills 0:e979170e02e7 255 #define STM32F2_CRYPTO
ashleymills 0:e979170e02e7 256 #define KEIL_INTRINSICS
ashleymills 0:e979170e02e7 257 #endif
ashleymills 0:e979170e02e7 258
ashleymills 0:e979170e02e7 259 #ifdef MICRIUM
ashleymills 0:e979170e02e7 260
ashleymills 0:e979170e02e7 261 #include "stdlib.h"
ashleymills 0:e979170e02e7 262 #include "net_cfg.h"
ashleymills 0:e979170e02e7 263 #include "ssl_cfg.h"
ashleymills 0:e979170e02e7 264 #include "net_secure_os.h"
ashleymills 0:e979170e02e7 265
ashleymills 0:e979170e02e7 266 #define CYASSL_TYPES
ashleymills 0:e979170e02e7 267
ashleymills 0:e979170e02e7 268 typedef CPU_INT08U byte;
ashleymills 0:e979170e02e7 269 typedef CPU_INT16U word16;
ashleymills 0:e979170e02e7 270 typedef CPU_INT32U word32;
ashleymills 0:e979170e02e7 271
ashleymills 0:e979170e02e7 272 #if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
ashleymills 0:e979170e02e7 273 #define SIZEOF_LONG 4
ashleymills 0:e979170e02e7 274 #undef SIZEOF_LONG_LONG
ashleymills 0:e979170e02e7 275 #else
ashleymills 0:e979170e02e7 276 #undef SIZEOF_LONG
ashleymills 0:e979170e02e7 277 #define SIZEOF_LONG_LONG 8
ashleymills 0:e979170e02e7 278 #endif
ashleymills 0:e979170e02e7 279
ashleymills 0:e979170e02e7 280 #define STRING_USER
ashleymills 0:e979170e02e7 281
ashleymills 0:e979170e02e7 282 #define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
ashleymills 0:e979170e02e7 283 #define XSTRNCPY(pstr_dest, pstr_src, len_max) \
ashleymills 0:e979170e02e7 284 ((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
ashleymills 0:e979170e02e7 285 (CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
ashleymills 0:e979170e02e7 286 #define XSTRNCMP(pstr_1, pstr_2, len_max) \
ashleymills 0:e979170e02e7 287 ((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
ashleymills 0:e979170e02e7 288 (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
ashleymills 0:e979170e02e7 289 #define XSTRSTR(pstr, pstr_srch) \
ashleymills 0:e979170e02e7 290 ((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
ashleymills 0:e979170e02e7 291 (CPU_CHAR *)(pstr_srch)))
ashleymills 0:e979170e02e7 292 #define XMEMSET(pmem, data_val, size) \
ashleymills 0:e979170e02e7 293 ((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
ashleymills 0:e979170e02e7 294 (CPU_SIZE_T)(size)))
ashleymills 0:e979170e02e7 295 #define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
ashleymills 0:e979170e02e7 296 (void *)(psrc), (CPU_SIZE_T)(size)))
ashleymills 0:e979170e02e7 297 #define XMEMCMP(pmem_1, pmem_2, size) \
ashleymills 0:e979170e02e7 298 (((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
ashleymills 0:e979170e02e7 299 (CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
ashleymills 0:e979170e02e7 300 #define XMEMMOVE XMEMCPY
ashleymills 0:e979170e02e7 301
ashleymills 0:e979170e02e7 302 #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 303 #define MICRIUM_MALLOC
ashleymills 0:e979170e02e7 304 #define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
ashleymills 0:e979170e02e7 305 (CPU_SIZE_T)(s), (void *)0))
ashleymills 0:e979170e02e7 306 #define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
ashleymills 0:e979170e02e7 307 (p), (void *)0))
ashleymills 0:e979170e02e7 308 #define XREALLOC(p, n, h, t) realloc((p), (n))
ashleymills 0:e979170e02e7 309 #endif
ashleymills 0:e979170e02e7 310
ashleymills 0:e979170e02e7 311 #if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 312 #undef NO_FILESYSTEM
ashleymills 0:e979170e02e7 313 #else
ashleymills 0:e979170e02e7 314 #define NO_FILESYSTEM
ashleymills 0:e979170e02e7 315 #endif
ashleymills 0:e979170e02e7 316
ashleymills 0:e979170e02e7 317 #if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
ashleymills 0:e979170e02e7 318 #define DEBUG_CYASSL
ashleymills 0:e979170e02e7 319 #else
ashleymills 0:e979170e02e7 320 #undef DEBUG_CYASSL
ashleymills 0:e979170e02e7 321 #endif
ashleymills 0:e979170e02e7 322
ashleymills 0:e979170e02e7 323 #if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 324 #define OPENSSL_EXTRA
ashleymills 0:e979170e02e7 325 #else
ashleymills 0:e979170e02e7 326 #undef OPENSSL_EXTRA
ashleymills 0:e979170e02e7 327 #endif
ashleymills 0:e979170e02e7 328
ashleymills 0:e979170e02e7 329 #if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 330 #undef SINGLE_THREADED
ashleymills 0:e979170e02e7 331 #else
ashleymills 0:e979170e02e7 332 #define SINGLE_THREADED
ashleymills 0:e979170e02e7 333 #endif
ashleymills 0:e979170e02e7 334
ashleymills 0:e979170e02e7 335 #if (SSL_CFG_DH_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 336 #undef NO_DH
ashleymills 0:e979170e02e7 337 #else
ashleymills 0:e979170e02e7 338 #define NO_DH
ashleymills 0:e979170e02e7 339 #endif
ashleymills 0:e979170e02e7 340
ashleymills 0:e979170e02e7 341 #if (SSL_CFG_DSA_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 342 #undef NO_DSA
ashleymills 0:e979170e02e7 343 #else
ashleymills 0:e979170e02e7 344 #define NO_DSA
ashleymills 0:e979170e02e7 345 #endif
ashleymills 0:e979170e02e7 346
ashleymills 0:e979170e02e7 347 #if (SSL_CFG_PSK_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 348 #undef NO_PSK
ashleymills 0:e979170e02e7 349 #else
ashleymills 0:e979170e02e7 350 #define NO_PSK
ashleymills 0:e979170e02e7 351 #endif
ashleymills 0:e979170e02e7 352
ashleymills 0:e979170e02e7 353 #if (SSL_CFG_3DES_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 354 #undef NO_DES
ashleymills 0:e979170e02e7 355 #else
ashleymills 0:e979170e02e7 356 #define NO_DES
ashleymills 0:e979170e02e7 357 #endif
ashleymills 0:e979170e02e7 358
ashleymills 0:e979170e02e7 359 #if (SSL_CFG_AES_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 360 #undef NO_AES
ashleymills 0:e979170e02e7 361 #else
ashleymills 0:e979170e02e7 362 #define NO_AES
ashleymills 0:e979170e02e7 363 #endif
ashleymills 0:e979170e02e7 364
ashleymills 0:e979170e02e7 365 #if (SSL_CFG_RC4_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 366 #undef NO_RC4
ashleymills 0:e979170e02e7 367 #else
ashleymills 0:e979170e02e7 368 #define NO_RC4
ashleymills 0:e979170e02e7 369 #endif
ashleymills 0:e979170e02e7 370
ashleymills 0:e979170e02e7 371 #if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 372 #undef NO_RABBIT
ashleymills 0:e979170e02e7 373 #else
ashleymills 0:e979170e02e7 374 #define NO_RABBIT
ashleymills 0:e979170e02e7 375 #endif
ashleymills 0:e979170e02e7 376
ashleymills 0:e979170e02e7 377 #if (SSL_CFG_HC128_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 378 #undef NO_HC128
ashleymills 0:e979170e02e7 379 #else
ashleymills 0:e979170e02e7 380 #define NO_HC128
ashleymills 0:e979170e02e7 381 #endif
ashleymills 0:e979170e02e7 382
ashleymills 0:e979170e02e7 383 #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
ashleymills 0:e979170e02e7 384 #define BIG_ENDIAN_ORDER
ashleymills 0:e979170e02e7 385 #else
ashleymills 0:e979170e02e7 386 #undef BIG_ENDIAN_ORDER
ashleymills 0:e979170e02e7 387 #define LITTLE_ENDIAN_ORDER
ashleymills 0:e979170e02e7 388 #endif
ashleymills 0:e979170e02e7 389
ashleymills 0:e979170e02e7 390 #if (SSL_CFG_MD4_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 391 #undef NO_MD4
ashleymills 0:e979170e02e7 392 #else
ashleymills 0:e979170e02e7 393 #define NO_MD4
ashleymills 0:e979170e02e7 394 #endif
ashleymills 0:e979170e02e7 395
ashleymills 0:e979170e02e7 396 #if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 397 #undef NO_WRITEV
ashleymills 0:e979170e02e7 398 #else
ashleymills 0:e979170e02e7 399 #define NO_WRITEV
ashleymills 0:e979170e02e7 400 #endif
ashleymills 0:e979170e02e7 401
ashleymills 0:e979170e02e7 402 #if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 403 #define NO_DEV_RANDOM
ashleymills 0:e979170e02e7 404 #else
ashleymills 0:e979170e02e7 405 #undef NO_DEV_RANDOM
ashleymills 0:e979170e02e7 406 #endif
ashleymills 0:e979170e02e7 407
ashleymills 0:e979170e02e7 408 #if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 409 #define CYASSL_USER_IO
ashleymills 0:e979170e02e7 410 #else
ashleymills 0:e979170e02e7 411 #undef CYASSL_USER_IO
ashleymills 0:e979170e02e7 412 #endif
ashleymills 0:e979170e02e7 413
ashleymills 0:e979170e02e7 414 #if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 415 #undef LARGE_STATIC_BUFFERS
ashleymills 0:e979170e02e7 416 #undef STATIC_CHUNKS_ONLY
ashleymills 0:e979170e02e7 417 #else
ashleymills 0:e979170e02e7 418 #define LARGE_STATIC_BUFFERS
ashleymills 0:e979170e02e7 419 #define STATIC_CHUNKS_ONLY
ashleymills 0:e979170e02e7 420 #endif
ashleymills 0:e979170e02e7 421
ashleymills 0:e979170e02e7 422 #if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 423 #define CYASSL_DER_LOAD
ashleymills 0:e979170e02e7 424 #else
ashleymills 0:e979170e02e7 425 #undef CYASSL_DER_LOAD
ashleymills 0:e979170e02e7 426 #endif
ashleymills 0:e979170e02e7 427
ashleymills 0:e979170e02e7 428 #if (SSL_CFG_DTLS_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 429 #define CYASSL_DTLS
ashleymills 0:e979170e02e7 430 #else
ashleymills 0:e979170e02e7 431 #undef CYASSL_DTLS
ashleymills 0:e979170e02e7 432 #endif
ashleymills 0:e979170e02e7 433
ashleymills 0:e979170e02e7 434 #if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 435 #define CYASSL_CALLBACKS
ashleymills 0:e979170e02e7 436 #else
ashleymills 0:e979170e02e7 437 #undef CYASSL_CALLBACKS
ashleymills 0:e979170e02e7 438 #endif
ashleymills 0:e979170e02e7 439
ashleymills 0:e979170e02e7 440 #if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 441 #define USE_FAST_MATH
ashleymills 0:e979170e02e7 442 #else
ashleymills 0:e979170e02e7 443 #undef USE_FAST_MATH
ashleymills 0:e979170e02e7 444 #endif
ashleymills 0:e979170e02e7 445
ashleymills 0:e979170e02e7 446 #if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
ashleymills 0:e979170e02e7 447 #define TFM_TIMING_RESISTANT
ashleymills 0:e979170e02e7 448 #else
ashleymills 0:e979170e02e7 449 #undef TFM_TIMING_RESISTANT
ashleymills 0:e979170e02e7 450 #endif
ashleymills 0:e979170e02e7 451
ashleymills 0:e979170e02e7 452 #endif /* MICRIUM */
ashleymills 0:e979170e02e7 453
ashleymills 0:e979170e02e7 454
ashleymills 0:e979170e02e7 455 #if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
ashleymills 0:e979170e02e7 456 !defined(CYASSL_LEANPSK)
ashleymills 0:e979170e02e7 457 #define USE_CYASSL_MEMORY
ashleymills 0:e979170e02e7 458 #endif
ashleymills 0:e979170e02e7 459
ashleymills 0:e979170e02e7 460 /* Place any other flags or defines here */
ashleymills 0:e979170e02e7 461
ashleymills 0:e979170e02e7 462
ashleymills 0:e979170e02e7 463 #ifdef __cplusplus
ashleymills 0:e979170e02e7 464 } /* extern "C" */
ashleymills 0:e979170e02e7 465 #endif
ashleymills 0:e979170e02e7 466
ashleymills 0:e979170e02e7 467
ashleymills 0:e979170e02e7 468 #endif /* CTAO_CRYPT_SETTINGS_H */
ashleymills 0:e979170e02e7 469