Update mbedTLS sources
[platform/upstream/iotivity.git] / extlibs / mbedtls / Added-ASan-build-config.patch
1 diff --git a/configs/config-mini-tls1_1.h b/configs/config-mini-tls1_1.h
2 index e22363d..2d6d5ac 100644
3 --- a/configs/config-mini-tls1_1.h
4 +++ b/configs/config-mini-tls1_1.h
5 @@ -29,7 +29,9 @@
6  #define MBEDTLS_CONFIG_H
7  
8  /* System support */
9 +#if !defined(__SANITIZE_ADDRESS__)
10  #define MBEDTLS_HAVE_ASM
11 +#endif
12  #define MBEDTLS_HAVE_TIME
13  
14  /* mbed TLS feature support */
15 diff --git a/configs/config-picocoin.h b/configs/config-picocoin.h
16 index 26b24a9..7fe0ee7 100644
17 --- a/configs/config-picocoin.h
18 +++ b/configs/config-picocoin.h
19 @@ -33,7 +33,9 @@
20  #define MBEDTLS_CONFIG_H
21  
22  /* System support */
23 +#if !defined(__SANITIZE_ADDRESS__)
24  #define MBEDTLS_HAVE_ASM
25 +#endif
26  #define MBEDTLS_HAVE_TIME
27  
28  /* mbed TLS feature support */
29 diff --git a/configs/config-suite-b.h b/configs/config-suite-b.h
30 index 3c4804c..45ad8d2 100644
31 --- a/configs/config-suite-b.h
32 +++ b/configs/config-suite-b.h
33 @@ -36,7 +36,9 @@
34  #define MBEDTLS_CONFIG_H
35  
36  /* System support */
37 +#if !defined(__SANITIZE_ADDRESS__)
38  #define MBEDTLS_HAVE_ASM
39 +#endif
40  #define MBEDTLS_HAVE_TIME
41  
42  /* mbed TLS feature support */
43 diff --git a/configs/config-thread.h b/configs/config-thread.h
44 index 3193a04..1e337c1 100644
45 --- a/configs/config-thread.h
46 +++ b/configs/config-thread.h
47 @@ -35,7 +35,9 @@
48  #define MBEDTLS_CONFIG_H
49  
50  /* System support */
51 +#if !defined(__SANITIZE_ADDRESS__)
52  #define MBEDTLS_HAVE_ASM
53 +#endif
54  
55  /* mbed TLS feature support */
56  #define MBEDTLS_AES_ROM_TABLES
57 diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
58 index 5bef190..d0b9606 100644
59 --- a/include/mbedtls/config.h
60 +++ b/include/mbedtls/config.h
61 @@ -39,6 +39,7 @@
62   * \{
63   */
64  
65 +#if !defined(__SANITIZE_ADDRESS__)
66  /**
67   * \def MBEDTLS_HAVE_ASM
68   *
69 @@ -54,6 +55,7 @@
70   * Comment to disable the use of assembly code.
71   */
72  #define MBEDTLS_HAVE_ASM
73 +#endif
74  
75  /**
76   * \def MBEDTLS_HAVE_SSE2
77 @@ -1410,6 +1412,7 @@
78   * \{
79   */
80  
81 +#if !defined(__SANITIZE_ADDRESS__)
82  /**
83   * \def MBEDTLS_AESNI_C
84   *
85 @@ -1423,6 +1426,7 @@
86   * This modules adds support for the AES-NI instructions on x86-64
87   */
88  #define MBEDTLS_AESNI_C
89 +#endif
90  
91  /**
92   * \def MBEDTLS_AES_C
93 @@ -1999,6 +2003,7 @@
94   */
95  #define MBEDTLS_OID_C
96  
97 +#if !defined(__SANITIZE_ADDRESS__)
98  /**
99   * \def MBEDTLS_PADLOCK_C
100   *
101 @@ -2012,6 +2017,7 @@
102   * This modules adds support for the VIA PadLock on x86.
103   */
104  #define MBEDTLS_PADLOCK_C
105 +#endif
106  
107  /**
108   * \def MBEDTLS_PEM_PARSE_C