MultiTech / CyaSSL

Dependents:   HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers settings.h Source File

settings.h

00001 /* settings.h
00002  *
00003  * Copyright (C) 2006-2014 wolfSSL Inc.
00004  *
00005  * This file is part of CyaSSL.
00006  *
00007  * CyaSSL is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * CyaSSL is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
00020  */
00021 
00022 /* Place OS specific preprocessor flags, defines, includes here, will be
00023    included into every file because types.h includes it */
00024 
00025 
00026 #ifndef CTAO_CRYPT_SETTINGS_H
00027 #define CTAO_CRYPT_SETTINGS_H
00028 
00029 #ifdef __cplusplus
00030     extern "C" {
00031 #endif
00032 
00033 /* Uncomment next line if using IPHONE */
00034 /* #define IPHONE */
00035 
00036 /* Uncomment next line if using ThreadX */
00037 /* #define THREADX */
00038 
00039 /* Uncomment next line if using Micrium ucOS */
00040 /* #define MICRIUM */
00041 
00042 /* Uncomment next line if using Mbed */
00043  #define MBED 
00044 
00045 /* Uncomment next line if using Microchip PIC32 ethernet starter kit */
00046 /* #define MICROCHIP_PIC32 */
00047 
00048 /* Uncomment next line if using Microchip TCP/IP stack, version 5 */
00049 /* #define MICROCHIP_TCPIP_V5 */
00050 
00051 /* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
00052 /* #define MICROCHIP_TCPIP */
00053 
00054 /* Uncomment next line if using PIC32MZ Crypto Engine */
00055 /* #define CYASSL_MICROCHIP_PIC32MZ */
00056         
00057 /* Uncomment next line if using FreeRTOS */
00058 /* #define FREERTOS */
00059 
00060 /* Uncomment next line if using FreeRTOS Windows Simulator */
00061 /* #define FREERTOS_WINSIM */
00062 
00063 /* Uncomment next line if using RTIP */
00064 /* #define EBSNET */
00065 
00066 /* Uncomment next line if using lwip */
00067 /* #define CYASSL_LWIP */
00068 
00069 /* Uncomment next line if building CyaSSL for a game console */
00070 /* #define CYASSL_GAME_BUILD */
00071 
00072 /* Uncomment next line if building CyaSSL for LSR */
00073 /* #define CYASSL_LSR */
00074 
00075 /* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
00076 /* #define FREESCALE_MQX */
00077 
00078 /* Uncomment next line if using STM32F2 */
00079 /* #define CYASSL_STM32F2 */
00080 
00081 /* Uncomment next line if using Comverge settings */
00082 /* #define COMVERGE */
00083 
00084 /* Uncomment next line if using QL SEP settings */
00085 /* #define CYASSL_QL */
00086 
00087 /* Uncomment next line if building for EROAD */
00088 /* #define CYASSL_EROAD */
00089       
00090 /* Uncomment next line if building for IAR EWARM */
00091 /* #define CYASSL_IAR_ARM */
00092 
00093 /* Uncomment next line if using TI-RTOS settings */
00094 /* #define CYASSL_TIRTOS */
00095 
00096 /* Uncomment next line if building with PicoTCP */
00097 /* #define CYASSL_PICOTCP */
00098 
00099 /* Uncomment next line if building for PicoTCP demo bundle */
00100 /* #define CYASSL_PICOTCP_DEMO */
00101 
00102 #include <cyassl/ctaocrypt/visibility.h>
00103 
00104 #ifdef IPHONE
00105     #define SIZEOF_LONG_LONG 8
00106 #endif
00107 
00108 
00109 #ifdef CYASSL_USER_SETTINGS
00110     #include <user_settings.h>
00111 #endif
00112 
00113 
00114 #ifdef COMVERGE
00115     #define THREADX
00116     #define HAVE_NETX
00117     #define CYASSL_USER_IO
00118     #define NO_WRITEV
00119     #define NO_DEV_RANDOM
00120     #define NO_FILESYSTEM
00121     #define NO_SHA512
00122     #define NO_DH
00123     #define NO_DSA
00124     #define NO_HC128
00125     #define NO_RSA
00126     #define NO_SESSION_CACHE
00127     #define HAVE_ECC 
00128 #endif
00129 
00130 
00131 #ifdef THREADX 
00132     #define SIZEOF_LONG_LONG 8
00133 #endif
00134 
00135 #ifdef HAVE_NETX
00136     #include "nx_api.h"
00137 #endif
00138 
00139 #if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */
00140     #define CYASSL_LWIP
00141     #define NO_WRITEV
00142     #define SINGLE_THREADED
00143     #define CYASSL_USER_IO
00144     #define NO_FILESYSTEM
00145 #endif 
00146     
00147 #if defined(CYASSL_IAR_ARM)
00148     #define NO_MAIN_DRIVER
00149     #define SINGLE_THREADED
00150     #define USE_CERT_BUFFERS_1024
00151     #define BENCH_EMBEDDED
00152     #define NO_FILESYSTEM
00153     #define NO_WRITEV
00154     #define CYASSL_USER_IO
00155     #define  BENCH_EMBEDDED
00156 #endif
00157       
00158 #ifdef MICROCHIP_PIC32
00159     /* #define CYASSL_MICROCHIP_PIC32MZ */
00160     #define SIZEOF_LONG_LONG 8
00161     #define SINGLE_THREADED
00162     #define CYASSL_USER_IO
00163     #define NO_WRITEV
00164     #define NO_DEV_RANDOM
00165     #define NO_FILESYSTEM
00166     #define USE_FAST_MATH
00167     #define TFM_TIMING_RESISTANT
00168 #endif
00169 
00170 #ifdef CYASSL_MICROCHIP_PIC32MZ
00171     #define CYASSL_PIC32MZ_CE
00172     #define CYASSL_PIC32MZ_CRYPT
00173     #define HAVE_AES_ENGINE
00174     #define CYASSL_PIC32MZ_RNG
00175     /* #define CYASSL_PIC32MZ_HASH */
00176     #define CYASSL_AES_COUNTER
00177     #define HAVE_AESGCM
00178     #define NO_BIG_INT
00179 
00180 #endif
00181 
00182 #ifdef MICROCHIP_TCPIP_V5
00183     /* include timer functions */
00184     #include "TCPIP Stack/TCPIP.h"
00185 #endif
00186 
00187 #ifdef MICROCHIP_TCPIP
00188     /* include timer, NTP functions */
00189     #ifdef MICROCHIP_MPLAB_HARMONY
00190         #include "tcpip/tcpip.h"
00191     #else
00192         #include "system/system_services.h"
00193         #include "tcpip/sntp.h"
00194     #endif
00195 #endif
00196 
00197 #ifdef MBED
00198     #define CYASSL_SHA384
00199     #define CYASSL_SHA512
00200     #define DEBUG_CYASSL
00201     #define SIZEOF_LONG 4
00202     #define SIZEOF_LONG_LONG 8
00203     #define MAX_CHAIN_DEPTH 15
00204     #define NO_TIME_VERIFY //Define to disable certificate date verification
00205     #define CYASSL_USER_IO
00206     #define NO_FILESYSTEM
00207     #define NO_CERT
00208     #define USE_CERT_BUFFERS_1024
00209     #define NO_WRITEV
00210     #define NO_DEV_RANDOM
00211     //#define NO_SHA512
00212     #define NO_DH
00213     #define NO_DSA
00214     #define NO_HC128
00215     #define HAVE_ECC
00216     #define NO_SESSION_CACHE
00217     #define SINGLE_THREADED
00218     //#define CYASSL_CMSIS_RTOS
00219 #endif
00220 
00221 
00222 #ifdef CYASSL_EROAD
00223     #define FREESCALE_MQX
00224     #define FREESCALE_MMCAU
00225     #define SINGLE_THREADED
00226     #define NO_STDIO_FILESYSTEM
00227     #define CYASSL_LEANPSK
00228     #define HAVE_NULL_CIPHER
00229     #define NO_OLD_TLS
00230     #define NO_ASN
00231     #define NO_BIG_INT
00232     #define NO_RSA
00233     #define NO_DSA
00234     #define NO_DH
00235     #define NO_CERTS
00236     #define NO_PWDBASED
00237     #define NO_DES3
00238     #define NO_MD4
00239     #define NO_RC4
00240     #define NO_MD5
00241     #define NO_SESSION_CACHE
00242     #define NO_MAIN_DRIVER
00243 #endif
00244 
00245 #ifdef CYASSL_PICOTCP
00246     #define errno pico_err
00247     #include "pico_defines.h"
00248     #include "pico_stack.h"
00249     #include "pico_constants.h"
00250     #define CUSTOM_RAND_GENERATE pico_rand
00251 #endif
00252 
00253 #ifdef CYASSL_PICOTCP_DEMO
00254     #define CYASSL_STM32
00255     #define USE_FAST_MATH
00256     #define TFM_TIMING_RESISTANT
00257     #define XMALLOC(s, h, type)  PICO_ZALLOC((s))
00258     #define XFREE(p, h, type)    PICO_FREE((p))
00259     #define SINGLE_THREADED
00260     #define NO_WRITEV
00261     #define CYASSL_USER_IO
00262     #define NO_DEV_RANDOM
00263     #define NO_FILESYSTEM
00264 #endif
00265 
00266 #ifdef FREERTOS_WINSIM
00267     #define FREERTOS
00268     #define USE_WINDOWS_API
00269 #endif
00270 
00271 
00272 /* Micrium will use Visual Studio for compilation but not the Win32 API */
00273 #if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
00274         && !defined(EBSNET) && !defined(CYASSL_EROAD)
00275     #define USE_WINDOWS_API
00276 #endif
00277 
00278 
00279 #if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
00280     #include <stdlib.h>
00281     #define XMALLOC(s, h, type)  malloc((s))
00282     #define XFREE(p, h, type)    free((p)) 
00283     #define XREALLOC(p, n, h, t) realloc((p), (n))
00284 #endif
00285 
00286 #if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
00287     #undef  XMALLOC
00288     #define XMALLOC     yaXMALLOC
00289     #undef  XFREE
00290     #define XFREE       yaXFREE
00291     #undef  XREALLOC
00292     #define XREALLOC    yaXREALLOC
00293 #endif
00294 
00295 
00296 #ifdef FREERTOS
00297     #ifndef NO_WRITEV
00298         #define NO_WRITEV
00299     #endif
00300     #ifndef NO_SHA512
00301         #define NO_SHA512
00302     #endif
00303     #ifndef NO_DH
00304         #define NO_DH
00305     #endif
00306     #ifndef NO_DSA
00307         #define NO_DSA
00308     #endif
00309     #ifndef NO_HC128
00310         #define NO_HC128
00311     #endif
00312 
00313     #ifndef SINGLE_THREADED
00314         #include "FreeRTOS.h"
00315         #include "semphr.h"
00316     #endif
00317 #endif
00318 
00319 #ifdef CYASSL_TIRTOS
00320     #define SIZEOF_LONG_LONG 8
00321     #define NO_WRITEV
00322     #define NO_CYASSL_DIR
00323     #define USE_FAST_MATH
00324     #define TFM_TIMING_RESISTANT
00325     #define NO_DEV_RANDOM
00326     #define NO_FILESYSTEM
00327     #define USE_CERT_BUFFERS_2048
00328     #define NO_ERROR_STRINGS
00329     #define USER_TIME
00330 
00331     #ifdef __IAR_SYSTEMS_ICC__
00332         #pragma diag_suppress=Pa089
00333     #elif !defined(__GNUC__)
00334         /* Suppress the sslpro warning */
00335         #pragma diag_suppress=11
00336     #endif
00337 
00338     #include <ti/ndk/nettools/mytime/mytime.h>
00339 #endif
00340 
00341 #ifdef EBSNET
00342     #include "rtip.h"
00343 
00344     /* #define DEBUG_CYASSL */
00345     #define NO_CYASSL_DIR  /* tbd */
00346 
00347     #if (POLLOS)
00348         #define SINGLE_THREADED
00349     #endif
00350 
00351     #if (RTPLATFORM)
00352         #if (!RTP_LITTLE_ENDIAN)
00353             #define BIG_ENDIAN_ORDER
00354         #endif
00355     #else
00356         #if (!KS_LITTLE_ENDIAN)
00357             #define BIG_ENDIAN_ORDER
00358         #endif
00359     #endif
00360 
00361     #if (WINMSP3)
00362         #undef SIZEOF_LONG
00363         #define SIZEOF_LONG_LONG 8
00364     #else
00365         #sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
00366     #endif
00367 
00368     #define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
00369     #define XFREE(p, h, type) (rtp_free(p))
00370     #define XREALLOC(p, n, h, t) realloc((p), (n))
00371 
00372 #endif /* EBSNET */
00373 
00374 #ifdef CYASSL_GAME_BUILD
00375     #define SIZEOF_LONG_LONG 8
00376     #if defined(__PPU) || defined(__XENON)
00377         #define BIG_ENDIAN_ORDER
00378     #endif
00379 #endif
00380 
00381 #ifdef CYASSL_LSR
00382     #define HAVE_WEBSERVER
00383     #define SIZEOF_LONG_LONG 8
00384     #define CYASSL_LOW_MEMORY
00385     #define NO_WRITEV
00386     #define NO_SHA512
00387     #define NO_DH
00388     #define NO_DSA
00389     #define NO_HC128
00390     #define NO_DEV_RANDOM
00391     #define NO_CYASSL_DIR
00392     #define NO_RABBIT
00393     #ifndef NO_FILESYSTEM
00394         #define LSR_FS
00395         #include "inc/hw_types.h"
00396         #include "fs.h"
00397     #endif
00398     #define CYASSL_LWIP
00399     #include <errno.h>  /* for tcp errno */
00400     #define CYASSL_SAFERTOS
00401     #if defined(__IAR_SYSTEMS_ICC__)
00402         /* enum uses enum */
00403         #pragma diag_suppress=Pa089
00404     #endif
00405 #endif
00406 
00407 #ifdef CYASSL_SAFERTOS
00408     #ifndef SINGLE_THREADED
00409         #include "SafeRTOS/semphr.h"
00410     #endif
00411 
00412     #include "SafeRTOS/heap.h"
00413     #define XMALLOC(s, h, type)  pvPortMalloc((s))
00414     #define XFREE(p, h, type)    vPortFree((p)) 
00415     #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
00416 #endif
00417 
00418 #ifdef CYASSL_LOW_MEMORY
00419     #undef  RSA_LOW_MEM
00420     #define RSA_LOW_MEM
00421     #undef  CYASSL_SMALL_STACK
00422     #define CYASSL_SMALL_STACK
00423     #undef  TFM_TIMING_RESISTANT
00424     #define TFM_TIMING_RESISTANT
00425 #endif
00426 
00427 #ifdef FREESCALE_MQX
00428     #define SIZEOF_LONG_LONG 8
00429     #define NO_WRITEV
00430     #define NO_DEV_RANDOM
00431     #define NO_RABBIT
00432     #define NO_CYASSL_DIR
00433     #define USE_FAST_MATH
00434     #define TFM_TIMING_RESISTANT
00435     #define FREESCALE_K70_RNGA
00436     /* #define FREESCALE_K53_RNGB */
00437     #include "mqx.h"
00438     #ifndef NO_FILESYSTEM
00439         #include "mfs.h"
00440         #include "fio.h"
00441     #endif
00442     #ifndef SINGLE_THREADED
00443         #include "mutex.h"
00444     #endif
00445 
00446     #define XMALLOC(s, h, t)    (void *)_mem_alloc_system((s))
00447     #define XFREE(p, h, t)      {void* xp = (p); if ((xp)) _mem_free((xp));}
00448     /* Note: MQX has no realloc, using fastmath above */
00449 #endif
00450 
00451 #ifdef CYASSL_STM32F2
00452     #define SIZEOF_LONG_LONG 8
00453     #define NO_DEV_RANDOM
00454     #define NO_CYASSL_DIR
00455     #define NO_RABBIT
00456     #define STM32F2_RNG
00457     #define STM32F2_CRYPTO
00458     #define KEIL_INTRINSICS
00459 #endif
00460 
00461 #ifdef MICRIUM
00462 
00463     #include "stdlib.h"
00464     #include "net_cfg.h"
00465     #include "ssl_cfg.h"
00466     #include "net_secure_os.h"
00467 
00468     #define CYASSL_TYPES
00469 
00470     typedef CPU_INT08U byte;
00471     typedef CPU_INT16U word16;
00472     typedef CPU_INT32U word32;
00473 
00474     #if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
00475         #define SIZEOF_LONG        4
00476         #undef  SIZEOF_LONG_LONG
00477     #else
00478         #undef  SIZEOF_LONG
00479         #define SIZEOF_LONG_LONG   8
00480     #endif
00481 
00482     #define STRING_USER
00483 
00484     #define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
00485     #define XSTRNCPY(pstr_dest, pstr_src, len_max) \
00486                     ((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
00487                      (CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
00488     #define XSTRNCMP(pstr_1, pstr_2, len_max) \
00489                     ((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
00490                      (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))  
00491     #define XSTRSTR(pstr, pstr_srch) \
00492                     ((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
00493                      (CPU_CHAR *)(pstr_srch)))
00494     #define XMEMSET(pmem, data_val, size) \
00495                     ((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
00496                     (CPU_SIZE_T)(size)))
00497     #define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
00498                      (void *)(psrc), (CPU_SIZE_T)(size)))
00499     #define XMEMCMP(pmem_1, pmem_2, size) \
00500                    (((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
00501                      (CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
00502     #define XMEMMOVE XMEMCPY
00503 
00504 #if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
00505     #define MICRIUM_MALLOC    
00506     #define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
00507                                  (CPU_SIZE_T)(s), (void *)0))
00508     #define XFREE(p, h, type)   (NetSecure_BlkFree((CPU_INT08U)(type), \
00509                                  (p), (void *)0))
00510     #define XREALLOC(p, n, h, t) realloc((p), (n))
00511 #endif
00512 
00513     #if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
00514         #undef  NO_FILESYSTEM
00515     #else
00516         #define NO_FILESYSTEM
00517     #endif
00518 
00519     #if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
00520         #define DEBUG_CYASSL
00521     #else
00522         #undef  DEBUG_CYASSL
00523     #endif
00524 
00525     #if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
00526         #define OPENSSL_EXTRA
00527     #else
00528         #undef  OPENSSL_EXTRA
00529     #endif
00530 
00531     #if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
00532         #undef  SINGLE_THREADED
00533     #else
00534         #define SINGLE_THREADED
00535     #endif
00536 
00537     #if (SSL_CFG_DH_EN == DEF_ENABLED)
00538         #undef  NO_DH
00539     #else
00540         #define NO_DH
00541     #endif
00542 
00543     #if (SSL_CFG_DSA_EN == DEF_ENABLED)
00544         #undef  NO_DSA
00545     #else
00546         #define NO_DSA
00547     #endif
00548 
00549     #if (SSL_CFG_PSK_EN == DEF_ENABLED)
00550         #undef  NO_PSK
00551     #else
00552         #define NO_PSK
00553     #endif
00554 
00555     #if (SSL_CFG_3DES_EN == DEF_ENABLED)
00556         #undef  NO_DES
00557     #else
00558         #define NO_DES
00559     #endif
00560 
00561     #if (SSL_CFG_AES_EN == DEF_ENABLED)
00562         #undef  NO_AES
00563     #else
00564         #define NO_AES
00565     #endif
00566 
00567     #if (SSL_CFG_RC4_EN == DEF_ENABLED)
00568         #undef  NO_RC4
00569     #else
00570         #define NO_RC4
00571     #endif
00572 
00573     #if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
00574         #undef  NO_RABBIT
00575     #else
00576         #define NO_RABBIT
00577     #endif
00578 
00579     #if (SSL_CFG_HC128_EN == DEF_ENABLED)
00580         #undef  NO_HC128
00581     #else
00582         #define NO_HC128
00583     #endif
00584 
00585     #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
00586         #define BIG_ENDIAN_ORDER
00587     #else
00588         #undef  BIG_ENDIAN_ORDER
00589         #define LITTLE_ENDIAN_ORDER
00590     #endif
00591 
00592     #if (SSL_CFG_MD4_EN == DEF_ENABLED)
00593         #undef  NO_MD4
00594     #else
00595         #define NO_MD4
00596     #endif
00597 
00598     #if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
00599         #undef  NO_WRITEV
00600     #else
00601         #define NO_WRITEV
00602     #endif
00603 
00604     #if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
00605         #define NO_DEV_RANDOM   
00606     #else
00607         #undef  NO_DEV_RANDOM
00608     #endif
00609 
00610     #if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
00611         #define CYASSL_USER_IO   
00612     #else
00613         #undef  CYASSL_USER_IO
00614     #endif
00615 
00616     #if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
00617         #undef  LARGE_STATIC_BUFFERS
00618         #undef  STATIC_CHUNKS_ONLY
00619     #else
00620         #define LARGE_STATIC_BUFFERS
00621         #define STATIC_CHUNKS_ONLY
00622     #endif
00623 
00624     #if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
00625         #define  CYASSL_DER_LOAD
00626     #else
00627         #undef   CYASSL_DER_LOAD
00628     #endif
00629 
00630     #if (SSL_CFG_DTLS_EN == DEF_ENABLED)
00631         #define  CYASSL_DTLS
00632     #else
00633         #undef   CYASSL_DTLS
00634     #endif
00635 
00636     #if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
00637          #define CYASSL_CALLBACKS
00638     #else
00639          #undef  CYASSL_CALLBACKS
00640     #endif
00641 
00642     #if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
00643          #define USE_FAST_MATH
00644     #else
00645          #undef  USE_FAST_MATH
00646     #endif
00647 
00648     #if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
00649          #define TFM_TIMING_RESISTANT
00650     #else
00651          #undef  TFM_TIMING_RESISTANT
00652     #endif
00653 
00654 #endif /* MICRIUM */
00655 
00656 
00657 #ifdef CYASSL_QL
00658     #ifndef CYASSL_SEP
00659         #define CYASSL_SEP
00660     #endif
00661     #ifndef OPENSSL_EXTRA
00662         #define OPENSSL_EXTRA
00663     #endif
00664     #ifndef SESSION_CERTS
00665         #define SESSION_CERTS
00666     #endif
00667     #ifndef HAVE_AESCCM
00668         #define HAVE_AESCCM
00669     #endif
00670     #ifndef ATOMIC_USER
00671         #define ATOMIC_USER
00672     #endif
00673     #ifndef CYASSL_DER_LOAD
00674         #define CYASSL_DER_LOAD
00675     #endif
00676     #ifndef KEEP_PEER_CERT
00677         #define KEEP_PEER_CERT
00678     #endif
00679     #ifndef HAVE_ECC
00680         #define HAVE_ECC
00681     #endif
00682     #ifndef SESSION_INDEX
00683         #define SESSION_INDEX
00684     #endif
00685 #endif /* CYASSL_QL */
00686 
00687 
00688 #if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
00689     !defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
00690     #define USE_CYASSL_MEMORY
00691 #endif
00692 
00693 
00694 #if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
00695     #undef  KEEP_PEER_CERT
00696     #define KEEP_PEER_CERT
00697 #endif
00698 
00699 
00700 /* stream ciphers except arc4 need 32bit alignment, intel ok without */
00701 #ifndef XSTREAM_ALIGNMENT
00702     #if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
00703         #define NO_XSTREAM_ALIGNMENT
00704     #else
00705         #define XSTREAM_ALIGNMENT
00706     #endif
00707 #endif
00708 
00709 
00710 /* FreeScale MMCAU hardware crypto has 4 byte alignment */
00711 #ifdef FREESCALE_MMCAU
00712     #define CYASSL_MMCAU_ALIGNMENT 4
00713 #endif
00714 
00715 /* if using hardware crypto and have alignment requirements, specify the
00716    requirement here.  The record header of SSL/TLS will prvent easy alignment.
00717    This hint tries to help as much as possible.  */
00718 #ifndef CYASSL_GENERAL_ALIGNMENT
00719     #ifdef CYASSL_AESNI
00720         #define CYASSL_GENERAL_ALIGNMENT 16
00721     #elif defined(XSTREAM_ALIGNMENT)
00722         #define CYASSL_GENERAL_ALIGNMENT  4
00723     #elif defined(FREESCALE_MMCAU)
00724         #define CYASSL_GENERAL_ALIGNMENT  CYASSL_MMCAU_ALIGNMENT
00725     #else 
00726         #define CYASSL_GENERAL_ALIGNMENT  0 
00727     #endif
00728 #endif
00729 
00730 #ifdef HAVE_CRL
00731     /* not widely supported yet */
00732     #undef NO_SKID
00733     #define NO_SKID
00734 #endif
00735 
00736 
00737 #ifdef __INTEL_COMPILER
00738     #pragma warning(disable:2259) /* explicit casts to smaller sizes, disable */
00739 #endif
00740 
00741 
00742 /* Place any other flags or defines here */
00743 
00744 
00745 #ifdef __cplusplus
00746     }   /* extern "C" */
00747 #endif
00748 
00749 
00750 #endif /* CTAO_CRYPT_SETTINGS_H */
00751