source: UsbWattMeter/trunk/wolfssl-3.7.0/wolfssl/cyassl/ctaocrypt/settings.h@ 167

Last change on this file since 167 was 167, checked in by coas-nagasima, 8 years ago

MIMEにSJISを設定

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr; charset=SHIFT_JIS
File size: 17.7 KB
Line 
1/* settings.h
2 *
3 * Copyright (C) 2006-2015 wolfSSL Inc.
4 *
5 * This file is part of wolfSSL. (formerly known as CyaSSL)
6 *
7 * wolfSSL is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * wolfSSL is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22/* Place OS specific preprocessor flags, defines, includes here, will be
23 included into every file because types.h includes it */
24
25
26#ifndef CTAO_CRYPT_SETTINGS_H
27#define CTAO_CRYPT_SETTINGS_H
28
29/* for reverse compatibility after name change */
30#include <cyassl/ctaocrypt/settings_comp.h>
31
32#ifdef __cplusplus
33 extern "C" {
34#endif
35
36/* Uncomment next line if using IPHONE */
37/* #define IPHONE */
38
39/* Uncomment next line if using ThreadX */
40/* #define THREADX */
41
42/* Uncomment next line if using Micrium ucOS */
43/* #define MICRIUM */
44
45/* Uncomment next line if using Mbed */
46/* #define MBED */
47
48/* Uncomment next line if using Microchip PIC32 ethernet starter kit */
49/* #define MICROCHIP_PIC32 */
50
51/* Uncomment next line if using Microchip TCP/IP stack, version 5 */
52/* #define MICROCHIP_TCPIP_V5 */
53
54/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
55/* #define MICROCHIP_TCPIP */
56
57/* Uncomment next line if using PIC32MZ Crypto Engine */
58/* #define CYASSL_MICROCHIP_PIC32MZ */
59
60/* Uncomment next line if using FreeRTOS */
61/* #define FREERTOS */
62
63/* Uncomment next line if using FreeRTOS Windows Simulator */
64/* #define FREERTOS_WINSIM */
65
66/* Uncomment next line if using RTIP */
67/* #define EBSNET */
68
69/* Uncomment next line if using lwip */
70/* #define CYASSL_LWIP */
71
72/* Uncomment next line if building CyaSSL for a game console */
73/* #define CYASSL_GAME_BUILD */
74
75/* Uncomment next line if building CyaSSL for LSR */
76/* #define CYASSL_LSR */
77
78/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
79/* #define FREESCALE_MQX */
80
81/* Uncomment next line if using STM32F2 */
82/* #define CYASSL_STM32F2 */
83
84/* Uncomment next line if using Comverge settings */
85/* #define COMVERGE */
86
87/* Uncomment next line if using QL SEP settings */
88/* #define CYASSL_QL */
89
90/* Uncomment next line if building for EROAD */
91/* #define CYASSL_EROAD */
92
93/* Uncomment next line if building for IAR EWARM */
94/* #define CYASSL_IAR_ARM */
95
96/* Uncomment next line if using TI-RTOS settings */
97/* #define CYASSL_TIRTOS */
98
99/* Uncomment next line if building with PicoTCP */
100/* #define CYASSL_PICOTCP */
101
102/* Uncomment next line if building for PicoTCP demo bundle */
103/* #define CYASSL_PICOTCP_DEMO */
104
105#include <cyassl/ctaocrypt/visibility.h>
106
107#ifdef IPHONE
108 #define SIZEOF_LONG_LONG 8
109#endif
110
111
112#ifdef CYASSL_USER_SETTINGS
113 #include <user_settings.h>
114#endif
115
116
117#ifdef COMVERGE
118 #define THREADX
119 #define HAVE_NETX
120 #define CYASSL_USER_IO
121 #define NO_WRITEV
122 #define NO_DEV_RANDOM
123 #define NO_FILESYSTEM
124 #define NO_SHA512
125 #define NO_DH
126 #define NO_DSA
127 #define NO_HC128
128 #define NO_RSA
129 #define NO_SESSION_CACHE
130 #define HAVE_ECC
131#endif
132
133
134#ifdef THREADX
135 #define SIZEOF_LONG_LONG 8
136#endif
137
138#ifdef HAVE_NETX
139 #include "nx_api.h"
140#endif
141
142#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */
143 #define CYASSL_LWIP
144 #define NO_WRITEV
145 #define SINGLE_THREADED
146 #define CYASSL_USER_IO
147 #define NO_FILESYSTEM
148#endif
149
150#if defined(CYASSL_IAR_ARM)
151 #define NO_MAIN_DRIVER
152 #define SINGLE_THREADED
153 #define USE_CERT_BUFFERS_1024
154 #define BENCH_EMBEDDED
155 #define NO_FILESYSTEM
156 #define NO_WRITEV
157 #define CYASSL_USER_IO
158 #define BENCH_EMBEDDED
159#endif
160
161#ifdef MICROCHIP_PIC32
162 /* #define CYASSL_MICROCHIP_PIC32MZ */
163 #define SIZEOF_LONG_LONG 8
164 #define SINGLE_THREADED
165 #define CYASSL_USER_IO
166 #define NO_WRITEV
167 #define NO_DEV_RANDOM
168 #define NO_FILESYSTEM
169 #define USE_FAST_MATH
170 #define TFM_TIMING_RESISTANT
171#endif
172
173#ifdef CYASSL_MICROCHIP_PIC32MZ
174 #define CYASSL_PIC32MZ_CE
175 #define CYASSL_PIC32MZ_CRYPT
176 #define HAVE_AES_ENGINE
177 #define CYASSL_PIC32MZ_RNG
178 /* #define CYASSL_PIC32MZ_HASH */
179 #define CYASSL_AES_COUNTER
180 #define HAVE_AESGCM
181 #define NO_BIG_INT
182
183#endif
184
185#ifdef MICROCHIP_TCPIP_V5
186 /* include timer functions */
187 #include "TCPIP Stack/TCPIP.h"
188#endif
189
190#ifdef MICROCHIP_TCPIP
191 /* include timer, NTP functions */
192 #ifdef MICROCHIP_MPLAB_HARMONY
193 #include "tcpip/tcpip.h"
194 #else
195 #include "system/system_services.h"
196 #include "tcpip/sntp.h"
197 #endif
198#endif
199
200#ifdef MBED
201 #define CYASSL_USER_IO
202 #define NO_FILESYSTEM
203 #define NO_CERT
204 #define USE_CERT_BUFFERS_1024
205 #define NO_WRITEV
206 #define NO_DEV_RANDOM
207 #define NO_SHA512
208 #define NO_DH
209 #define NO_DSA
210 #define NO_HC128
211 #define HAVE_ECC
212 #define NO_SESSION_CACHE
213 #define CYASSL_CMSIS_RTOS
214#endif
215
216
217#ifdef CYASSL_EROAD
218 #define FREESCALE_MQX
219 #define FREESCALE_MMCAU
220 #define SINGLE_THREADED
221 #define NO_STDIO_FILESYSTEM
222 #define CYASSL_LEANPSK
223 #define HAVE_NULL_CIPHER
224 #define NO_OLD_TLS
225 #define NO_ASN
226 #define NO_BIG_INT
227 #define NO_RSA
228 #define NO_DSA
229 #define NO_DH
230 #define NO_CERTS
231 #define NO_PWDBASED
232 #define NO_DES3
233 #define NO_MD4
234 #define NO_RC4
235 #define NO_MD5
236 #define NO_SESSION_CACHE
237 #define NO_MAIN_DRIVER
238#endif
239
240#ifdef CYASSL_PICOTCP
241 #define errno pico_err
242 #include "pico_defines.h"
243 #include "pico_stack.h"
244 #include "pico_constants.h"
245 #define CUSTOM_RAND_GENERATE pico_rand
246#endif
247
248#ifdef CYASSL_PICOTCP_DEMO
249 #define CYASSL_STM32
250 #define USE_FAST_MATH
251 #define TFM_TIMING_RESISTANT
252 #define XMALLOC(s, h, type) PICO_ZALLOC((s))
253 #define XFREE(p, h, type) PICO_FREE((p))
254 #define SINGLE_THREADED
255 #define NO_WRITEV
256 #define CYASSL_USER_IO
257 #define NO_DEV_RANDOM
258 #define NO_FILESYSTEM
259#endif
260
261#ifdef FREERTOS_WINSIM
262 #define FREERTOS
263 #define USE_WINDOWS_API
264#endif
265
266
267/* Micrium will use Visual Studio for compilation but not the Win32 API */
268#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
269 && !defined(EBSNET) && !defined(CYASSL_EROAD)
270 #define USE_WINDOWS_API
271#endif
272
273
274#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
275 #include <stdlib.h>
276 #define XMALLOC(s, h, type) malloc((s))
277 #define XFREE(p, h, type) free((p))
278 #define XREALLOC(p, n, h, t) realloc((p), (n))
279#endif
280
281#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
282 #undef XMALLOC
283 #define XMALLOC yaXMALLOC
284 #undef XFREE
285 #define XFREE yaXFREE
286 #undef XREALLOC
287 #define XREALLOC yaXREALLOC
288#endif
289
290
291#ifdef FREERTOS
292 #ifndef NO_WRITEV
293 #define NO_WRITEV
294 #endif
295 #ifndef NO_SHA512
296 #define NO_SHA512
297 #endif
298 #ifndef NO_DH
299 #define NO_DH
300 #endif
301 #ifndef NO_DSA
302 #define NO_DSA
303 #endif
304 #ifndef NO_HC128
305 #define NO_HC128
306 #endif
307
308 #ifndef SINGLE_THREADED
309 #include "FreeRTOS.h"
310 #include "semphr.h"
311 #endif
312#endif
313
314#ifdef CYASSL_TIRTOS
315 #define SIZEOF_LONG_LONG 8
316 #define NO_WRITEV
317 #define NO_CYASSL_DIR
318 #define USE_FAST_MATH
319 #define TFM_TIMING_RESISTANT
320 #define NO_DEV_RANDOM
321 #define NO_FILESYSTEM
322 #define USE_CERT_BUFFERS_2048
323 #define NO_ERROR_STRINGS
324 #define USER_TIME
325
326 #ifdef __IAR_SYSTEMS_ICC__
327 #pragma diag_suppress=Pa089
328 #elif !defined(__GNUC__)
329 /* Suppress the sslpro warning */
330 #pragma diag_suppress=11
331 #endif
332
333 #include <ti/ndk/nettools/mytime/mytime.h>
334#endif
335
336#ifdef EBSNET
337 #include "rtip.h"
338
339 /* #define DEBUG_CYASSL */
340 #define NO_CYASSL_DIR /* tbd */
341
342 #if (POLLOS)
343 #define SINGLE_THREADED
344 #endif
345
346 #if (RTPLATFORM)
347 #if (!RTP_LITTLE_ENDIAN)
348 #define BIG_ENDIAN_ORDER
349 #endif
350 #else
351 #if (!KS_LITTLE_ENDIAN)
352 #define BIG_ENDIAN_ORDER
353 #endif
354 #endif
355
356 #if (WINMSP3)
357 #undef SIZEOF_LONG
358 #define SIZEOF_LONG_LONG 8
359 #else
360 #sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
361 #endif
362
363 #define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
364 #define XFREE(p, h, type) (rtp_free(p))
365 #define XREALLOC(p, n, h, t) realloc((p), (n))
366
367#endif /* EBSNET */
368
369#ifdef CYASSL_GAME_BUILD
370 #define SIZEOF_LONG_LONG 8
371 #if defined(__PPU) || defined(__XENON)
372 #define BIG_ENDIAN_ORDER
373 #endif
374#endif
375
376#ifdef CYASSL_LSR
377 #define HAVE_WEBSERVER
378 #define SIZEOF_LONG_LONG 8
379 #define CYASSL_LOW_MEMORY
380 #define NO_WRITEV
381 #define NO_SHA512
382 #define NO_DH
383 #define NO_DSA
384 #define NO_HC128
385 #define NO_DEV_RANDOM
386 #define NO_CYASSL_DIR
387 #define NO_RABBIT
388 #ifndef NO_FILESYSTEM
389 #define LSR_FS
390 #include "inc/hw_types.h"
391 #include "fs.h"
392 #endif
393 #define CYASSL_LWIP
394 #include <errno.h> /* for tcp errno */
395 #define CYASSL_SAFERTOS
396 #if defined(__IAR_SYSTEMS_ICC__)
397 /* enum uses enum */
398 #pragma diag_suppress=Pa089
399 #endif
400#endif
401
402#ifdef CYASSL_SAFERTOS
403 #ifndef SINGLE_THREADED
404 #include "SafeRTOS/semphr.h"
405 #endif
406
407 #include "SafeRTOS/heap.h"
408 #define XMALLOC(s, h, type) pvPortMalloc((s))
409 #define XFREE(p, h, type) vPortFree((p))
410 #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
411#endif
412
413#ifdef CYASSL_LOW_MEMORY
414 #undef RSA_LOW_MEM
415 #define RSA_LOW_MEM
416 #undef CYASSL_SMALL_STACK
417 #define CYASSL_SMALL_STACK
418 #undef TFM_TIMING_RESISTANT
419 #define TFM_TIMING_RESISTANT
420#endif
421
422#ifdef FREESCALE_MQX
423 #define SIZEOF_LONG_LONG 8
424 #define NO_WRITEV
425 #define NO_DEV_RANDOM
426 #define NO_RABBIT
427 #define NO_CYASSL_DIR
428 #define USE_FAST_MATH
429 #define TFM_TIMING_RESISTANT
430 #define FREESCALE_K70_RNGA
431 /* #define FREESCALE_K53_RNGB */
432 #include "mqx.h"
433 #ifndef NO_FILESYSTEM
434 #include "mfs.h"
435 #include "fio.h"
436 #endif
437 #ifndef SINGLE_THREADED
438 #include "mutex.h"
439 #endif
440
441 #define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
442 #define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
443 /* Note: MQX has no realloc, using fastmath above */
444#endif
445
446#ifdef CYASSL_STM32F2
447 #define SIZEOF_LONG_LONG 8
448 #define NO_DEV_RANDOM
449 #define NO_CYASSL_DIR
450 #define NO_RABBIT
451 #define STM32F2_RNG
452 #define STM32F2_CRYPTO
453 #define KEIL_INTRINSICS
454#endif
455
456#ifdef MICRIUM
457
458 #include "stdlib.h"
459 #include "net_cfg.h"
460 #include "ssl_cfg.h"
461 #include "net_secure_os.h"
462
463 #define CYASSL_TYPES
464
465 typedef CPU_INT08U byte;
466 typedef CPU_INT16U word16;
467 typedef CPU_INT32U word32;
468
469 #if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
470 #define SIZEOF_LONG 4
471 #undef SIZEOF_LONG_LONG
472 #else
473 #undef SIZEOF_LONG
474 #define SIZEOF_LONG_LONG 8
475 #endif
476
477 #define STRING_USER
478
479 #define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
480 #define XSTRNCPY(pstr_dest, pstr_src, len_max) \
481 ((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
482 (CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
483 #define XSTRNCMP(pstr_1, pstr_2, len_max) \
484 ((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
485 (CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
486 #define XSTRSTR(pstr, pstr_srch) \
487 ((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
488 (CPU_CHAR *)(pstr_srch)))
489 #define XMEMSET(pmem, data_val, size) \
490 ((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
491 (CPU_SIZE_T)(size)))
492 #define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
493 (void *)(psrc), (CPU_SIZE_T)(size)))
494 #define XMEMCMP(pmem_1, pmem_2, size) \
495 (((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
496 (CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
497 #define XMEMMOVE XMEMCPY
498
499#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
500 #define MICRIUM_MALLOC
501 #define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
502 (CPU_SIZE_T)(s), (void *)0))
503 #define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
504 (p), (void *)0))
505 #define XREALLOC(p, n, h, t) realloc((p), (n))
506#endif
507
508 #if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
509 #undef NO_FILESYSTEM
510 #else
511 #define NO_FILESYSTEM
512 #endif
513
514 #if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
515 #define DEBUG_CYASSL
516 #else
517 #undef DEBUG_CYASSL
518 #endif
519
520 #if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
521 #define OPENSSL_EXTRA
522 #else
523 #undef OPENSSL_EXTRA
524 #endif
525
526 #if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
527 #undef SINGLE_THREADED
528 #else
529 #define SINGLE_THREADED
530 #endif
531
532 #if (SSL_CFG_DH_EN == DEF_ENABLED)
533 #undef NO_DH
534 #else
535 #define NO_DH
536 #endif
537
538 #if (SSL_CFG_DSA_EN == DEF_ENABLED)
539 #undef NO_DSA
540 #else
541 #define NO_DSA
542 #endif
543
544 #if (SSL_CFG_PSK_EN == DEF_ENABLED)
545 #undef NO_PSK
546 #else
547 #define NO_PSK
548 #endif
549
550 #if (SSL_CFG_3DES_EN == DEF_ENABLED)
551 #undef NO_DES
552 #else
553 #define NO_DES
554 #endif
555
556 #if (SSL_CFG_AES_EN == DEF_ENABLED)
557 #undef NO_AES
558 #else
559 #define NO_AES
560 #endif
561
562 #if (SSL_CFG_RC4_EN == DEF_ENABLED)
563 #undef NO_RC4
564 #else
565 #define NO_RC4
566 #endif
567
568 #if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
569 #undef NO_RABBIT
570 #else
571 #define NO_RABBIT
572 #endif
573
574 #if (SSL_CFG_HC128_EN == DEF_ENABLED)
575 #undef NO_HC128
576 #else
577 #define NO_HC128
578 #endif
579
580 #if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
581 #define BIG_ENDIAN_ORDER
582 #else
583 #undef BIG_ENDIAN_ORDER
584 #define LITTLE_ENDIAN_ORDER
585 #endif
586
587 #if (SSL_CFG_MD4_EN == DEF_ENABLED)
588 #undef NO_MD4
589 #else
590 #define NO_MD4
591 #endif
592
593 #if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
594 #undef NO_WRITEV
595 #else
596 #define NO_WRITEV
597 #endif
598
599 #if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
600 #define NO_DEV_RANDOM
601 #else
602 #undef NO_DEV_RANDOM
603 #endif
604
605 #if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
606 #define CYASSL_USER_IO
607 #else
608 #undef CYASSL_USER_IO
609 #endif
610
611 #if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
612 #undef LARGE_STATIC_BUFFERS
613 #undef STATIC_CHUNKS_ONLY
614 #else
615 #define LARGE_STATIC_BUFFERS
616 #define STATIC_CHUNKS_ONLY
617 #endif
618
619 #if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
620 #define CYASSL_DER_LOAD
621 #else
622 #undef CYASSL_DER_LOAD
623 #endif
624
625 #if (SSL_CFG_DTLS_EN == DEF_ENABLED)
626 #define CYASSL_DTLS
627 #else
628 #undef CYASSL_DTLS
629 #endif
630
631 #if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
632 #define CYASSL_CALLBACKS
633 #else
634 #undef CYASSL_CALLBACKS
635 #endif
636
637 #if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
638 #define USE_FAST_MATH
639 #else
640 #undef USE_FAST_MATH
641 #endif
642
643 #if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
644 #define TFM_TIMING_RESISTANT
645 #else
646 #undef TFM_TIMING_RESISTANT
647 #endif
648
649#endif /* MICRIUM */
650
651
652#ifdef CYASSL_QL
653 #ifndef CYASSL_SEP
654 #define CYASSL_SEP
655 #endif
656 #ifndef OPENSSL_EXTRA
657 #define OPENSSL_EXTRA
658 #endif
659 #ifndef SESSION_CERTS
660 #define SESSION_CERTS
661 #endif
662 #ifndef HAVE_AESCCM
663 #define HAVE_AESCCM
664 #endif
665 #ifndef ATOMIC_USER
666 #define ATOMIC_USER
667 #endif
668 #ifndef CYASSL_DER_LOAD
669 #define CYASSL_DER_LOAD
670 #endif
671 #ifndef KEEP_PEER_CERT
672 #define KEEP_PEER_CERT
673 #endif
674 #ifndef HAVE_ECC
675 #define HAVE_ECC
676 #endif
677 #ifndef SESSION_INDEX
678 #define SESSION_INDEX
679 #endif
680#endif /* CYASSL_QL */
681
682
683#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
684 !defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
685 #define USE_CYASSL_MEMORY
686#endif
687
688
689#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
690 #undef KEEP_PEER_CERT
691 #define KEEP_PEER_CERT
692#endif
693
694
695/* stream ciphers except arc4 need 32bit alignment, intel ok without */
696#ifndef XSTREAM_ALIGNMENT
697 #if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
698 #define NO_XSTREAM_ALIGNMENT
699 #else
700 #define XSTREAM_ALIGNMENT
701 #endif
702#endif
703
704
705/* FreeScale MMCAU hardware crypto has 4 byte alignment */
706#ifdef FREESCALE_MMCAU
707 #define CYASSL_MMCAU_ALIGNMENT 4
708#endif
709
710/* if using hardware crypto and have alignment requirements, specify the
711 requirement here. The record header of SSL/TLS will prvent easy alignment.
712 This hint tries to help as much as possible. */
713#ifndef CYASSL_GENERAL_ALIGNMENT
714 #ifdef CYASSL_AESNI
715 #define CYASSL_GENERAL_ALIGNMENT 16
716 #elif defined(XSTREAM_ALIGNMENT)
717 #define CYASSL_GENERAL_ALIGNMENT 4
718 #elif defined(FREESCALE_MMCAU)
719 #define CYASSL_GENERAL_ALIGNMENT CYASSL_MMCAU_ALIGNMENT
720 #else
721 #define CYASSL_GENERAL_ALIGNMENT 0
722 #endif
723#endif
724
725#ifdef HAVE_CRL
726 /* not widely supported yet */
727 #undef NO_SKID
728 #define NO_SKID
729#endif
730
731
732#ifdef __INTEL_COMPILER
733 #pragma warning(disable:2259) /* explicit casts to smaller sizes, disable */
734#endif
735
736
737/* Place any other flags or defines here */
738
739
740#ifdef __cplusplus
741 } /* extern "C" */
742#endif
743
744
745#endif /* CTAO_CRYPT_SETTINGS_H */
Note: See TracBrowser for help on using the repository browser.