Skip to content

Commit 65a1a34

Browse files
committed
The ESP8266 core brings it's own version of BearSSL, don't compile our version
1 parent 4546bcd commit 65a1a34

File tree

278 files changed

+1397
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+1397
-0
lines changed

src/tls/bearssl/aes_big_cbcdec.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -67,3 +70,5 @@ const br_block_cbcdec_class br_aes_big_cbcdec_vtable = {
6770
(void (*)(const br_block_cbcdec_class *const *, void *, void *, size_t))
6871
&br_aes_big_cbcdec_run
6972
};
73+
74+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_big_cbcenc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -65,3 +68,5 @@ const br_block_cbcenc_class br_aes_big_cbcenc_vtable = {
6568
(void (*)(const br_block_cbcenc_class *const *, void *, void *, size_t))
6669
&br_aes_big_cbcenc_run
6770
};
71+
72+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_big_ctr.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -82,3 +85,5 @@ const br_block_ctr_class br_aes_big_ctr_vtable = {
8285
const void *, uint32_t, void *, size_t))
8386
&br_aes_big_ctr_run
8487
};
88+
89+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_big_ctrcbc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -140,3 +143,5 @@ const br_block_ctrcbc_class br_aes_big_ctrcbc_vtable = {
140143
void *, const void *, size_t))
141144
&br_aes_big_ctrcbc_mac
142145
};
146+
147+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_big_dec.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/*
@@ -252,3 +255,5 @@ br_aes_big_decrypt(unsigned num_rounds, const uint32_t *skey, void *data)
252255
br_enc32be(buf + 8, s2);
253256
br_enc32be(buf + 12, s3);
254257
}
258+
259+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_big_enc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
#define S br_aes_S
@@ -155,3 +158,5 @@ br_aes_big_encrypt(unsigned num_rounds, const uint32_t *skey, void *data)
155158
br_enc32be(buf + 8, s2);
156159
br_enc32be(buf + 12, s3);
157160
}
161+
162+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_common.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
static const uint32_t Rcon[] = {
@@ -110,3 +113,5 @@ br_aes_keysched(uint32_t *skey, const void *key, size_t key_len)
110113
}
111114
return num_rounds;
112115
}
116+
117+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see inner.h */
@@ -326,3 +329,5 @@ br_aes_ct_skey_expand(uint32_t *skey,
326329
skey[v + 1] = y | (y >> 1);
327330
}
328331
}
332+
333+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct64.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see inner.h */
@@ -396,3 +399,5 @@ br_aes_ct64_skey_expand(uint64_t *skey,
396399
skey[v + 3] = (x3 << 4) - x3;
397400
}
398401
}
402+
403+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct64_cbcdec.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -102,3 +105,5 @@ const br_block_cbcdec_class br_aes_ct64_cbcdec_vtable = {
102105
(void (*)(const br_block_cbcdec_class *const *, void *, void *, size_t))
103106
&br_aes_ct64_cbcdec_run
104107
};
108+
109+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct64_cbcenc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -79,3 +82,5 @@ const br_block_cbcenc_class br_aes_ct64_cbcenc_vtable = {
7982
(void (*)(const br_block_cbcenc_class *const *, void *, void *, size_t))
8083
&br_aes_ct64_cbcenc_run
8184
};
85+
86+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct64_ctr.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -112,3 +115,5 @@ const br_block_ctr_class br_aes_ct64_ctr_vtable = {
112115
const void *, uint32_t, void *, size_t))
113116
&br_aes_ct64_ctr_run
114117
};
118+
119+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct64_ctrcbc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -431,3 +434,5 @@ const br_block_ctrcbc_class br_aes_ct64_ctrcbc_vtable = {
431434
void *, const void *, size_t))
432435
&br_aes_ct64_ctrcbc_mac
433436
};
437+
438+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct64_dec.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see inner.h */
@@ -157,3 +160,5 @@ br_aes_ct64_bitslice_decrypt(unsigned num_rounds,
157160
br_aes_ct64_bitslice_invSbox(q);
158161
add_round_key(q, skey);
159162
}
163+
164+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct64_enc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
static inline void
@@ -113,3 +116,5 @@ br_aes_ct64_bitslice_encrypt(unsigned num_rounds,
113116
shift_rows(q);
114117
add_round_key(q, skey + (num_rounds << 3));
115118
}
119+
120+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct_cbcdec.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -109,3 +112,5 @@ const br_block_cbcdec_class br_aes_ct_cbcdec_vtable = {
109112
(void (*)(const br_block_cbcdec_class *const *, void *, void *, size_t))
110113
&br_aes_ct_cbcdec_run
111114
};
115+
116+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct_cbcenc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -89,3 +92,5 @@ const br_block_cbcenc_class br_aes_ct_cbcenc_vtable = {
8992
(void (*)(const br_block_cbcenc_class *const *, void *, void *, size_t))
9093
&br_aes_ct_cbcenc_run
9194
};
95+
96+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct_ctr.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -114,3 +117,5 @@ const br_block_ctr_class br_aes_ct_ctr_vtable = {
114117
const void *, uint32_t, void *, size_t))
115118
&br_aes_ct_ctr_run
116119
};
120+
121+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct_ctrcbc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see bearssl_block.h */
@@ -420,3 +423,5 @@ const br_block_ctrcbc_class br_aes_ct_ctrcbc_vtable = {
420423
void *, const void *, size_t))
421424
&br_aes_ct_ctrcbc_mac
422425
};
426+
427+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct_dec.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
/* see inner.h */
@@ -168,3 +171,5 @@ br_aes_ct_bitslice_decrypt(unsigned num_rounds,
168171
br_aes_ct_bitslice_invSbox(q);
169172
add_round_key(q, skey);
170173
}
174+
175+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_ct_enc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#include "inner.h"
2629

2730
static inline void
@@ -110,3 +113,5 @@ br_aes_ct_bitslice_encrypt(unsigned num_rounds,
110113
shift_rows(q);
111114
add_round_key(q, skey + (num_rounds << 3));
112115
}
116+
117+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_pwr8.c

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#define BR_POWER_ASM_MACROS 1
2629
#include "inner.h"
2730

@@ -38,6 +41,7 @@ key_schedule_128(unsigned char *sk, const unsigned char *key)
3841
long cc;
3942

4043
static const uint32_t fmod[] = { 0x11B, 0x11B, 0x11B, 0x11B };
44+
4145
#if BR_POWER8_LE
4246
static const uint32_t idx2be[] = {
4347
0x03020100, 0x07060504, 0x0B0A0908, 0x0F0E0D0C
@@ -443,3 +447,5 @@ br_aes_pwr8_keysched(unsigned char *sk, const void *key, size_t len)
443447
}
444448

445449
#endif
450+
451+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_pwr8_cbcdec.c

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#define BR_POWER_ASM_MACROS 1
2629
#include "inner.h"
2730

@@ -400,6 +403,7 @@ cbcdec_256(const unsigned char *sk,
400403
static const uint32_t idx2be[] = {
401404
0x03020100, 0x07060504, 0x0B0A0908, 0x0F0E0D0C
402405
};
406+
403407
#endif
404408

405409
cc0 = 0;
@@ -668,3 +672,5 @@ br_aes_pwr8_cbcdec_get_vtable(void)
668672
}
669673

670674
#endif
675+
676+
#endif /* #ifdef BOARD_HAS_ECCX08 */

src/tls/bearssl/aes_pwr8_cbcenc.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* SOFTWARE.
2323
*/
2424

25+
#include <ArduinoIoTCloud_Config.h>
26+
#ifdef BOARD_HAS_ECCX08
27+
2528
#define BR_POWER_ASM_MACROS 1
2629
#include "inner.h"
2730

@@ -415,3 +418,5 @@ br_aes_pwr8_cbcenc_get_vtable(void)
415418
}
416419

417420
#endif
421+
422+
#endif /* #ifdef BOARD_HAS_ECCX08 */

0 commit comments

Comments
 (0)