Skip to content

Commit fa00334

Browse files
authored
Merge pull request #98 from arduino/add-ca
Add new ca trust anchors
2 parents feca160 + fdd7b23 commit fa00334

File tree

3 files changed

+55
-14
lines changed

3 files changed

+55
-14
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ CPPFLAGS += -DARDUINO
77
ifeq ($(RELEASE),1)
88
CFLAGS += -DNDEBUG -DCONFIG_FREERTOS_ASSERT_DISABLE -Os -DLOG_LOCAL_LEVEL=0
99
CPPFLAGS += -DNDEBUG -Os
10+
$(info RELEASE)
1011
endif
1112

1213
ifeq ($(UNO_WIFI_REV2),1)
1314
CFLAGS += -DUNO_WIFI_REV2
1415
CPPFLAGS += -DUNO_WIFI_REV2
16+
$(info UNO_WIFI_REV2)
1517
endif
1618

1719
ifeq ($(NANO_RP2040_CONNECT),1)
1820
CFLAGS += -DNANO_RP2040_CONNECT
1921
CPPFLAGS += -DNANO_RP2040_CONNECT
22+
$(info NANO_RP2040_CONNECT)
2023
endif
2124

2225
include $(IDF_PATH)/make/project.mk

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ This firmware uses [Espressif's IDF](https://github.com/espressif/esp-idf)
88
1. Extract it and add it to your `PATH`: `export PATH=$PATH:<path/to/toolchain>/bin`
99
1. Clone **v3.3.1** of the IDF: `git clone --branch v3.3.1 --recursive https://github.com/espressif/esp-idf.git`
1010
1. Set the `IDF_PATH` environment variable: `export IDF_PATH=<path/to/idf>`
11-
1. Run `make` to build the firmware (in the directory of this read me)
11+
1. Run `make` to build the firmware (in the directory of this read me). You may want to add different depending on the target board.
12+
1. `RELEASE=1 make` for MKR WiFi 1010 and Nano 33 IoT
13+
1. `RELEASE=1 NANO_RP2040_CONNECT=1 make` for Nano RP2040 connect
14+
1. `RELEASE=1 UNO_WIFI_REV2=1 make` for UNO WiFi Rev2
15+
1216
1. Load the `Tools -> SerialNINAPassthrough` example sketch on to the board
1317
1. Use `esptool` to flash the compiled firmware
1418

arduino/libraries/ArduinoBearSSL/src/BearSSLTrustAnchors.h

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
//
3535
// brssl ta *.cer
3636

37+
//iot.arduino.cc:8883
38+
//iot.oniudra.cc:8883
3739
static const unsigned char TA0_DN[] = {
3840
0x30, 0x45, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
3941
0x02, 0x55, 0x53, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x0A,
@@ -52,26 +54,45 @@ static const unsigned char TA0_EC_Q[] = {
5254
0x42, 0x89, 0x89, 0x55, 0x22
5355
};
5456

57+
//iot.arduino.cc:8885
5558
static const unsigned char TA1_DN[] = {
56-
0x30, 0x50, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
59+
0x30, 0x45, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
5760
0x02, 0x55, 0x53, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x0A,
5861
0x13, 0x0E, 0x41, 0x72, 0x64, 0x75, 0x69, 0x6E, 0x6F, 0x20, 0x4C, 0x4C,
5962
0x43, 0x20, 0x55, 0x53, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
60-
0x0B, 0x13, 0x02, 0x49, 0x54, 0x31, 0x1B, 0x30, 0x19, 0x06, 0x03, 0x55,
61-
0x04, 0x03, 0x13, 0x12, 0x63, 0x65, 0x73, 0x2E, 0x69, 0x6F, 0x74, 0x2E,
62-
0x61, 0x72, 0x64, 0x75, 0x69, 0x6E, 0x6F, 0x2E, 0x63, 0x63
63+
0x0B, 0x13, 0x02, 0x49, 0x54, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55,
64+
0x04, 0x03, 0x13, 0x07, 0x41, 0x72, 0x64, 0x75, 0x69, 0x6E, 0x6F
6365
};
6466

6567
static const unsigned char TA1_EC_Q[] = {
66-
0x04, 0x57, 0x4A, 0xF7, 0xFB, 0x20, 0x2A, 0x1E, 0xBD, 0x98, 0xD5, 0xA8,
67-
0xFF, 0xD4, 0xEF, 0x7B, 0x90, 0xB9, 0x37, 0xA0, 0xB7, 0x00, 0x16, 0x09,
68-
0x57, 0x3C, 0xD5, 0x92, 0x42, 0xAA, 0x9F, 0x78, 0xCF, 0xD5, 0x54, 0x21,
69-
0xE6, 0x28, 0x89, 0x73, 0x2A, 0x4E, 0xC3, 0x9D, 0xBC, 0x10, 0x57, 0x79,
70-
0x91, 0x87, 0x93, 0xD8, 0xAE, 0x15, 0xA7, 0xDB, 0x79, 0x56, 0x4D, 0x5F,
71-
0x96, 0x8D, 0xE3, 0xDC, 0x51
68+
0x04, 0xA1, 0xE1, 0x53, 0x6C, 0x35, 0x52, 0x1A, 0x33, 0x0D, 0xE8, 0x2B,
69+
0xAC, 0x5B, 0x12, 0xC1, 0x8F, 0x50, 0x37, 0xB3, 0x3E, 0x64, 0x9B, 0xA0,
70+
0xEE, 0x27, 0x02, 0x35, 0xC7, 0x8D, 0x5A, 0x10, 0x45, 0xD0, 0xCA, 0xF5,
71+
0x52, 0xEC, 0x97, 0xF2, 0x9A, 0xFF, 0x81, 0xC6, 0xE2, 0x79, 0x97, 0x3F,
72+
0xD3, 0x39, 0xC6, 0xD7, 0xA1, 0xCC, 0x6B, 0x61, 0x85, 0x70, 0xF6, 0x3B,
73+
0xAE, 0x62, 0x1D, 0x71, 0xC8
74+
};
75+
76+
//iot.oniudra.cc:8885
77+
static const unsigned char TA2_DN[] = {
78+
0x30, 0x45, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
79+
0x02, 0x55, 0x53, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x0A,
80+
0x13, 0x0E, 0x41, 0x72, 0x64, 0x75, 0x69, 0x6E, 0x6F, 0x20, 0x4C, 0x4C,
81+
0x43, 0x20, 0x55, 0x53, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
82+
0x0B, 0x13, 0x02, 0x49, 0x54, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55,
83+
0x04, 0x03, 0x13, 0x07, 0x41, 0x72, 0x64, 0x75, 0x69, 0x6E, 0x6F
84+
};
85+
86+
static const unsigned char TA2_EC_Q[] = {
87+
0x04, 0x11, 0x70, 0x34, 0xE0, 0xC3, 0x3E, 0x00, 0xBD, 0x0B, 0x59, 0x03,
88+
0x98, 0xA0, 0x5B, 0x6B, 0x0B, 0x50, 0xDF, 0x51, 0x66, 0x4E, 0xE7, 0x40,
89+
0x5D, 0x5A, 0x46, 0x48, 0xE5, 0x30, 0x70, 0x35, 0xF9, 0xF3, 0x6C, 0xFC,
90+
0xDB, 0x47, 0x03, 0x78, 0x86, 0x82, 0xC0, 0xEC, 0x60, 0x86, 0x62, 0x3E,
91+
0xA7, 0xF0, 0xA9, 0x38, 0x7E, 0xB7, 0x7F, 0x91, 0x7A, 0x87, 0x6D, 0xC4,
92+
0xAE, 0xA6, 0x4C, 0x06, 0x48
7293
};
7394

74-
static const br_x509_trust_anchor ArduinoIoTCloudTrustAnchor[2] = {
95+
static const br_x509_trust_anchor ArduinoIoTCloudTrustAnchor[3] = {
7596
{
7697
{ (unsigned char *)TA0_DN, sizeof TA0_DN },
7798
BR_X509_TA_CA,
@@ -87,7 +108,7 @@ static const br_x509_trust_anchor ArduinoIoTCloudTrustAnchor[2] = {
87108
},
88109
{
89110
{ (unsigned char *)TA1_DN, sizeof TA1_DN },
90-
0,
111+
BR_X509_TA_CA,
91112
{
92113
BR_KEYTYPE_EC,
93114
{
@@ -97,9 +118,22 @@ static const br_x509_trust_anchor ArduinoIoTCloudTrustAnchor[2] = {
97118
}
98119
}
99120
}
121+
},
122+
{
123+
{ (unsigned char *)TA2_DN, sizeof TA2_DN },
124+
BR_X509_TA_CA,
125+
{
126+
BR_KEYTYPE_EC,
127+
{
128+
.ec = {
129+
BR_EC_secp256r1,
130+
(unsigned char *)TA2_EC_Q, sizeof TA2_EC_Q,
131+
}
132+
}
133+
}
100134
}
101135
};
102136

103-
#define ArduinoIoTCloudTrustAnchor_NUM (2)
137+
#define ArduinoIoTCloudTrustAnchor_NUM (3)
104138

105139
#endif /* _BEAR_SSL_TRUST_ANCHOR_H_ */

0 commit comments

Comments
 (0)