36893894ef0d0a7debffcaebe21746e095a40f1a
[platform/upstream/connectedhomeip.git] / src / credentials / tests / CHIPCert_test_vectors.cpp
1 /*
2  *
3  *    Copyright (c) 2020-2021 Project CHIP Authors
4  *    Copyright (c) 2019 Google LLC.
5  *    Copyright (c) 2016-2017 Nest Labs, Inc.
6  *    All rights reserved.
7  *
8  *    Licensed under the Apache License, Version 2.0 (the "License");
9  *    you may not use this file except in compliance with the License.
10  *    You may obtain a copy of the License at
11  *
12  *        http://www.apache.org/licenses/LICENSE-2.0
13  *
14  *    Unless required by applicable law or agreed to in writing, software
15  *    distributed under the License is distributed on an "AS IS" BASIS,
16  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  *    See the License for the specific language governing permissions and
18  *    limitations under the License.
19  */
20
21 /**
22  *    @file
23  *      This file contains definitions of test certificates used by various unit tests.
24  *
25  */
26
27 #include <credentials/CHIPCert.h>
28
29 #include "CHIPCert_test_vectors.h"
30
31 namespace chip {
32 namespace TestCerts {
33
34 using namespace chip::Credentials;
35 using namespace chip::ASN1;
36
37 // clang-format off
38 extern const uint8_t gTestCerts[] = {
39     TestCertTypes::kRoot,
40     TestCertTypes::kNodeCA,
41     TestCertTypes::kNode01,
42     TestCertTypes::kFirmwareSigningCA,
43     TestCertTypes::kFirmwareSigning,
44 };
45 // clang-format on
46
47 extern const size_t gNumTestCerts = sizeof(gTestCerts) / sizeof(gTestCerts[0]);
48
49 CHIP_ERROR GetTestCert(uint8_t certType, BitFlags<uint8_t, TestCertLoadFlags> certLoadFlags, const uint8_t *& certData,
50                        uint32_t & certDataLen)
51 {
52     CHIP_ERROR err;
53     bool derForm = certLoadFlags.Has(TestCertLoadFlags::kDERForm);
54
55 #define SELECT_CERT(NAME)                                                                                                          \
56     do                                                                                                                             \
57     {                                                                                                                              \
58         if (certType == TestCertTypes::k##NAME)                                                                                    \
59         {                                                                                                                          \
60             if (derForm)                                                                                                           \
61             {                                                                                                                      \
62                 certData    = sTestCert_##NAME##_DER;                                                                              \
63                 certDataLen = sTestCert_##NAME##_DER_Len;                                                                          \
64             }                                                                                                                      \
65             else                                                                                                                   \
66             {                                                                                                                      \
67                 certData    = sTestCert_##NAME##_Chip;                                                                             \
68                 certDataLen = sTestCert_##NAME##_Chip_Len;                                                                         \
69             }                                                                                                                      \
70             ExitNow(err = CHIP_NO_ERROR);                                                                                          \
71         }                                                                                                                          \
72     } while (0)
73
74     SELECT_CERT(Root);
75     SELECT_CERT(NodeCA);
76     SELECT_CERT(Node01);
77     SELECT_CERT(FirmwareSigningCA);
78     SELECT_CERT(FirmwareSigning);
79
80     err = CHIP_ERROR_CA_CERT_NOT_FOUND;
81
82 exit:
83     return err;
84 }
85
86 const char * GetTestCertName(uint8_t certType)
87 {
88 #define NAME_CERT(NAME)                                                                                                            \
89     do                                                                                                                             \
90     {                                                                                                                              \
91         if (certType == TestCertTypes::k##NAME)                                                                                    \
92         {                                                                                                                          \
93             return #NAME;                                                                                                          \
94         }                                                                                                                          \
95     } while (0)
96
97     NAME_CERT(Root);
98     NAME_CERT(NodeCA);
99     NAME_CERT(Node01);
100     NAME_CERT(FirmwareSigningCA);
101     NAME_CERT(FirmwareSigning);
102
103     return nullptr;
104 }
105
106 CHIP_ERROR LoadTestCert(ChipCertificateSet & certSet, uint8_t certType, BitFlags<uint8_t, TestCertLoadFlags> certLoadFlags,
107                         BitFlags<uint8_t, CertDecodeFlags> decodeFlags)
108 {
109     CHIP_ERROR err;
110     ChipCertificateData * cert;
111     const uint8_t * certData;
112     uint32_t certDataLen;
113
114     // Special case for loading the root public key only.
115     if (certType == TestCertTypes::kRootKey)
116     {
117         // Add the trusted root key to the certificate set.
118         err = certSet.AddTrustedKey(sTestCert_Root_Id, kOID_EllipticCurve_prime256v1, sTestCert_Root_PublicKey,
119                                     sTestCert_Root_PublicKey_Len, sTestCert_Root_SubjectKeyId, sTestCert_Root_SubjectKeyId_Len);
120         ExitNow();
121     }
122
123     // Get the requested certificate data.
124     err = GetTestCert(certType, certLoadFlags, certData, certDataLen);
125     SuccessOrExit(err);
126
127     // Load it into the certificate set.
128     err = certSet.LoadCert(certData, certDataLen, decodeFlags);
129     SuccessOrExit(err);
130
131     // Get loaded certificate data.
132     cert = const_cast<ChipCertificateData *>(certSet.GetLastCert());
133     VerifyOrExit(cert != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT);
134
135     // Apply load flags.
136     if (certLoadFlags.Has(TestCertLoadFlags::kSuppressIsCA))
137     {
138         cert->mCertFlags.Clear(CertFlags::kIsCA);
139     }
140     if (certLoadFlags.Has(TestCertLoadFlags::kSuppressKeyUsage))
141     {
142         cert->mCertFlags.Clear(CertFlags::kExtPresent_KeyUsage);
143     }
144     if (certLoadFlags.Has(TestCertLoadFlags::kSuppressKeyCertSign))
145     {
146         cert->mKeyUsageFlags.Clear(KeyUsageFlags::kKeyCertSign);
147     }
148     if (certLoadFlags.Has(TestCertLoadFlags::kSetPathLenConstZero))
149     {
150         cert->mCertFlags.Set(CertFlags::kPathLenConstraintPresent);
151         cert->mPathLenConstraint = 0;
152     }
153     if (certLoadFlags.Has(TestCertLoadFlags::kSetAppDefinedCertType))
154     {
155         cert->mCertType = kCertType_AppDefinedBase;
156     }
157
158 exit:
159     return err;
160 }
161
162 // ------------------------------ TEST CERTIFICATES ----------------------------------------
163
164 /**************  Test Root Certificate  **************
165 Certificate:
166     Data:
167         Version: 3 (0x2)
168         Serial Number: 5006394895241320551 (0x457a49a1d8301867)
169         Signature Algorithm: ecdsa-with-SHA256
170         Issuer: 1.3.6.1.4.1.37244.1.2 = CACACACA00000001
171         Validity
172             Not Before: Oct 15 14:23:43 2020 GMT
173             Not After : Oct 15 14:23:42 2040 GMT
174         Subject: 1.3.6.1.4.1.37244.1.2 = CACACACA00000001
175         Subject Public Key Info:
176             Public Key Algorithm: id-ecPublicKey
177                 Public-Key: (256 bit)
178                 pub:
179                     04:60:c2:96:ed:06:5d:58:76:da:a8:70:dc:1e:5a:
180                     8b:a7:e4:d0:fd:02:96:c1:e7:ca:e1:5e:04:2e:e2:
181                     ba:1d:3a:7c:bd:e2:fb:95:cc:7a:0c:c4:d3:86:e1:
182                     11:df:a2:3b:df:cc:b9:e9:78:a6:3b:3b:9a:34:79:
183                     be:7f:a4:8a:87
184                 ASN1 OID: prime256v1
185                 NIST CURVE: P-256
186         X509v3 extensions:
187             X509v3 Basic Constraints: critical
188                 CA:TRUE
189             X509v3 Key Usage: critical
190                 Certificate Sign, CRL Sign
191             X509v3 Subject Key Identifier:
192                 6D:B7:5D:18:AF:31:5D:00:53:F0:57:96:39:6A:AA:4C:84:CC:C8:B8
193             X509v3 Authority Key Identifier:
194                 keyid:6D:B7:5D:18:AF:31:5D:00:53:F0:57:96:39:6A:AA:4C:84:CC:C8:B8
195
196     Signature Algorithm: ecdsa-with-SHA256
197          30:44:02:20:77:f4:15:08:d5:01:37:23:68:73:87:ff:b9:a5:
198          2a:ed:15:64:f4:5b:6f:a1:17:f8:31:ae:75:4b:9b:3d:f0:79:
199          02:20:2a:45:a0:0c:0c:47:67:4a:6d:e1:53:9d:5c:e0:49:64:
200          b7:2f:88:4d:fe:aa:e6:06:41:af:51:ad:25:8b:14:91
201
202 -----BEGIN CERTIFICATE-----
203 MIIBnDCCAUOgAwIBAgIIRXpJodgwGGcwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB
204 gqJ8AQIMEENBQ0FDQUNBMDAwMDAwMDEwHhcNMjAxMDE1MTQyMzQzWhcNNDAxMDE1
205 MTQyMzQyWjAiMSAwHgYKKwYBBAGConwBAgwQQ0FDQUNBQ0EwMDAwMDAwMTBZMBMG
206 ByqGSM49AgEGCCqGSM49AwEHA0IABGDClu0GXVh22qhw3B5ai6fk0P0ClsHnyuFe
207 BC7iuh06fL3i+5XMegzE04bhEd+iO9/Muel4pjs7mjR5vn+kioejYzBhMA8GA1Ud
208 EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRtt10YrzFdAFPw
209 V5Y5aqpMhMzIuDAfBgNVHSMEGDAWgBRtt10YrzFdAFPwV5Y5aqpMhMzIuDAKBggq
210 hkjOPQQDAgNHADBEAiB39BUI1QE3I2hzh/+5pSrtFWT0W2+hF/gxrnVLmz3weQIg
211 KkWgDAxHZ0pt4VOdXOBJZLcviE3+quYGQa9RrSWLFJE=
212 -----END CERTIFICATE-----
213
214 -----BEGIN EC PRIVATE KEY-----
215 MHcCAQEEICOUC/wOMm36dWGR7uq2NEvBUV0NLclyNzZSK+QaMh7uoAoGCCqGSM49
216 AwEHoUQDQgAEYMKW7QZdWHbaqHDcHlqLp+TQ/QKWwefK4V4ELuK6HTp8veL7lcx6
217 DMTThuER36I738y56XimOzuaNHm+f6SKhw==
218 -----END EC PRIVATE KEY-----
219 */
220
221 extern const uint8_t sTestCert_Root_Chip[] = {
222     0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x45, 0x7a, 0x49, 0xa1, 0xd8, 0x30, 0x18, 0x67, 0x24, 0x02, 0x01,
223     0x37, 0x03, 0x27, 0x12, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05,
224     0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x12, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24,
225     0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x60, 0xc2, 0x96, 0xed, 0x06, 0x5d, 0x58, 0x76, 0xda, 0xa8, 0x70, 0xdc, 0x1e, 0x5a, 0x8b,
226     0xa7, 0xe4, 0xd0, 0xfd, 0x02, 0x96, 0xc1, 0xe7, 0xca, 0xe1, 0x5e, 0x04, 0x2e, 0xe2, 0xba, 0x1d, 0x3a, 0x7c, 0xbd, 0xe2, 0xfb,
227     0x95, 0xcc, 0x7a, 0x0c, 0xc4, 0xd3, 0x86, 0xe1, 0x11, 0xdf, 0xa2, 0x3b, 0xdf, 0xcc, 0xb9, 0xe9, 0x78, 0xa6, 0x3b, 0x3b, 0x9a,
228     0x34, 0x79, 0xbe, 0x7f, 0xa4, 0x8a, 0x87, 0x35, 0x80, 0x29, 0x01, 0x18, 0x24, 0x81, 0x60, 0x30, 0x83, 0x14, 0x6d, 0xb7, 0x5d,
229     0x18, 0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c, 0x84, 0xcc, 0xc8, 0xb8, 0x30, 0x84, 0x14, 0x6d,
230     0xb7, 0x5d, 0x18, 0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c, 0x84, 0xcc, 0xc8, 0xb8, 0x35, 0x0a,
231     0x30, 0x01, 0x20, 0x77, 0xf4, 0x15, 0x08, 0xd5, 0x01, 0x37, 0x23, 0x68, 0x73, 0x87, 0xff, 0xb9, 0xa5, 0x2a, 0xed, 0x15, 0x64,
232     0xf4, 0x5b, 0x6f, 0xa1, 0x17, 0xf8, 0x31, 0xae, 0x75, 0x4b, 0x9b, 0x3d, 0xf0, 0x79, 0x30, 0x02, 0x20, 0x2a, 0x45, 0xa0, 0x0c,
233     0x0c, 0x47, 0x67, 0x4a, 0x6d, 0xe1, 0x53, 0x9d, 0x5c, 0xe0, 0x49, 0x64, 0xb7, 0x2f, 0x88, 0x4d, 0xfe, 0xaa, 0xe6, 0x06, 0x41,
234     0xaf, 0x51, 0xad, 0x25, 0x8b, 0x14, 0x91, 0x18, 0x18,
235 };
236
237 extern const uint32_t sTestCert_Root_Chip_Len = sizeof(sTestCert_Root_Chip);
238
239 extern const uint8_t sTestCert_Root_DER[] = {
240     0x30, 0x82, 0x01, 0x9c, 0x30, 0x82, 0x01, 0x43, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x45, 0x7a, 0x49, 0xa1, 0xd8, 0x30,
241     0x18, 0x67, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x22, 0x31, 0x20, 0x30, 0x1e, 0x06,
242     0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41,
243     0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32,
244     0x33, 0x34, 0x33, 0x5a, 0x17, 0x0d, 0x34, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32, 0x33, 0x34, 0x32, 0x5a, 0x30, 0x22,
245     0x31, 0x20, 0x30, 0x1e, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43,
246     0x41, 0x43, 0x41, 0x43, 0x41, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
247     0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x60, 0xc2,
248     0x96, 0xed, 0x06, 0x5d, 0x58, 0x76, 0xda, 0xa8, 0x70, 0xdc, 0x1e, 0x5a, 0x8b, 0xa7, 0xe4, 0xd0, 0xfd, 0x02, 0x96, 0xc1, 0xe7,
249     0xca, 0xe1, 0x5e, 0x04, 0x2e, 0xe2, 0xba, 0x1d, 0x3a, 0x7c, 0xbd, 0xe2, 0xfb, 0x95, 0xcc, 0x7a, 0x0c, 0xc4, 0xd3, 0x86, 0xe1,
250     0x11, 0xdf, 0xa2, 0x3b, 0xdf, 0xcc, 0xb9, 0xe9, 0x78, 0xa6, 0x3b, 0x3b, 0x9a, 0x34, 0x79, 0xbe, 0x7f, 0xa4, 0x8a, 0x87, 0xa3,
251     0x63, 0x30, 0x61, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30,
252     0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,
253     0x0e, 0x04, 0x16, 0x04, 0x14, 0x6d, 0xb7, 0x5d, 0x18, 0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c,
254     0x84, 0xcc, 0xc8, 0xb8, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x6d, 0xb7, 0x5d, 0x18,
255     0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c, 0x84, 0xcc, 0xc8, 0xb8, 0x30, 0x0a, 0x06, 0x08, 0x2a,
256     0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x77, 0xf4, 0x15, 0x08, 0xd5, 0x01, 0x37,
257     0x23, 0x68, 0x73, 0x87, 0xff, 0xb9, 0xa5, 0x2a, 0xed, 0x15, 0x64, 0xf4, 0x5b, 0x6f, 0xa1, 0x17, 0xf8, 0x31, 0xae, 0x75, 0x4b,
258     0x9b, 0x3d, 0xf0, 0x79, 0x02, 0x20, 0x2a, 0x45, 0xa0, 0x0c, 0x0c, 0x47, 0x67, 0x4a, 0x6d, 0xe1, 0x53, 0x9d, 0x5c, 0xe0, 0x49,
259     0x64, 0xb7, 0x2f, 0x88, 0x4d, 0xfe, 0xaa, 0xe6, 0x06, 0x41, 0xaf, 0x51, 0xad, 0x25, 0x8b, 0x14, 0x91,
260 };
261
262 extern const uint32_t sTestCert_Root_DER_Len = sizeof(sTestCert_Root_DER);
263
264 extern const uint8_t sTestCert_Root_PublicKey[] = {
265     0x04, 0x60, 0xc2, 0x96, 0xed, 0x06, 0x5d, 0x58, 0x76, 0xda, 0xa8, 0x70, 0xdc, 0x1e, 0x5a, 0x8b, 0xa7,
266     0xe4, 0xd0, 0xfd, 0x02, 0x96, 0xc1, 0xe7, 0xca, 0xe1, 0x5e, 0x04, 0x2e, 0xe2, 0xba, 0x1d, 0x3a, 0x7c,
267     0xbd, 0xe2, 0xfb, 0x95, 0xcc, 0x7a, 0x0c, 0xc4, 0xd3, 0x86, 0xe1, 0x11, 0xdf, 0xa2, 0x3b, 0xdf, 0xcc,
268     0xb9, 0xe9, 0x78, 0xa6, 0x3b, 0x3b, 0x9a, 0x34, 0x79, 0xbe, 0x7f, 0xa4, 0x8a, 0x87,
269 };
270
271 extern const uint8_t sTestCert_Root_PublicKey_Len = sizeof(sTestCert_Root_PublicKey);
272
273 extern const uint8_t sTestCert_Root_PrivateKey[] = {
274     0x23, 0x94, 0x0b, 0xfc, 0x0e, 0x32, 0x6d, 0xfa, 0x75, 0x61, 0x91, 0xee, 0xea, 0xb6, 0x34, 0x4b,
275     0xc1, 0x51, 0x5d, 0x0d, 0x2d, 0xc9, 0x72, 0x37, 0x36, 0x52, 0x2b, 0xe4, 0x1a, 0x32, 0x1e, 0xee,
276 };
277
278 extern const uint8_t sTestCert_Root_PrivateKey_Len = sizeof(sTestCert_Root_PrivateKey);
279
280 extern const uint8_t sTestCert_Root_SubjectKeyId[] = {
281     0x6D, 0xB7, 0x5D, 0x18, 0xAF, 0x31, 0x5D, 0x00, 0x53, 0xF0, 0x57, 0x96, 0x39, 0x6A, 0xAA, 0x4C, 0x84, 0xCC, 0xC8, 0xB8,
282 };
283
284 extern const uint8_t sTestCert_Root_SubjectKeyId_Len = sizeof(sTestCert_Root_SubjectKeyId);
285
286 extern const uint64_t sTestCert_Root_Id = 0xCACACACA00000001ULL;
287
288 /**************  Test NodeCA Certificate  **************
289 Certificate:
290     Data:
291         Version: 3 (0x2)
292         Serial Number: 8592183283896268644 (0x773d912c61afb764)
293         Signature Algorithm: ecdsa-with-SHA256
294         Issuer: 1.3.6.1.4.1.37244.1.2 = CACACACA00000001
295         Validity
296             Not Before: Oct 15 14:23:43 2020 GMT
297             Not After : Oct 15 14:23:42 2040 GMT
298         Subject: 1.3.6.1.4.1.37244.1.2 = CACACACA00000002
299         Subject Public Key Info:
300             Public Key Algorithm: id-ecPublicKey
301                 Public-Key: (256 bit)
302                 pub:
303                     04:cb:15:4e:4d:cf:ca:9d:b5:81:43:f8:5b:5a:fa:
304                     50:6f:54:47:04:7b:8b:4a:99:d2:0b:56:47:65:9a:
305                     09:42:df:04:dd:e4:b2:42:57:20:e2:99:55:15:9c:
306                     26:38:49:85:3d:45:02:b0:84:bc:ad:ed:86:74:d1:
307                     dd:d0:4e:da:40
308                 ASN1 OID: prime256v1
309                 NIST CURVE: P-256
310         X509v3 extensions:
311             X509v3 Basic Constraints: critical
312                 CA:TRUE
313             X509v3 Key Usage: critical
314                 Certificate Sign, CRL Sign
315             X509v3 Subject Key Identifier:
316                 32:E1:8F:C4:AE:08:F3:20:82:4C:E5:32:EF:74:6D:F4:FC:7F:70:36
317             X509v3 Authority Key Identifier:
318                 keyid:6D:B7:5D:18:AF:31:5D:00:53:F0:57:96:39:6A:AA:4C:84:CC:C8:B8
319
320     Signature Algorithm: ecdsa-with-SHA256
321          30:45:02:20:78:2a:01:d8:51:34:3b:24:29:18:4b:a2:4b:74:
322          81:b2:02:1d:9c:c0:b4:b8:ff:5a:44:1a:9f:49:e4:7b:09:60:
323          02:21:00:87:a1:b6:cc:05:5d:9e:1b:96:81:29:42:eb:a1:e6:
324          cd:71:f4:9b:0f:28:bf:57:7d:c8:45:e2:f3:f6:85:20:83
325
326 -----BEGIN CERTIFICATE-----
327 MIIBnTCCAUOgAwIBAgIIdz2RLGGvt2QwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB
328 gqJ8AQIMEENBQ0FDQUNBMDAwMDAwMDEwHhcNMjAxMDE1MTQyMzQzWhcNNDAxMDE1
329 MTQyMzQyWjAiMSAwHgYKKwYBBAGConwBAgwQQ0FDQUNBQ0EwMDAwMDAwMjBZMBMG
330 ByqGSM49AgEGCCqGSM49AwEHA0IABMsVTk3Pyp21gUP4W1r6UG9URwR7i0qZ0gtW
331 R2WaCULfBN3kskJXIOKZVRWcJjhJhT1FArCEvK3thnTR3dBO2kCjYzBhMA8GA1Ud
332 EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQy4Y/ErgjzIIJM
333 5TLvdG30/H9wNjAfBgNVHSMEGDAWgBRtt10YrzFdAFPwV5Y5aqpMhMzIuDAKBggq
334 hkjOPQQDAgNIADBFAiB4KgHYUTQ7JCkYS6JLdIGyAh2cwLS4/1pEGp9J5HsJYAIh
335 AIehtswFXZ4bloEpQuuh5s1x9JsPKL9XfchF4vP2hSCD
336 -----END CERTIFICATE-----
337
338 -----BEGIN EC PRIVATE KEY-----
339 MHcCAQEEIIvJ5bc8BwOwpNfbtFZ64HvoeeSh/a7xwlccc5N8qJ7PoAoGCCqGSM49
340 AwEHoUQDQgAEyxVOTc/KnbWBQ/hbWvpQb1RHBHuLSpnSC1ZHZZoJQt8E3eSyQlcg
341 4plVFZwmOEmFPUUCsIS8re2GdNHd0E7aQA==
342 -----END EC PRIVATE KEY-----
343 */
344
345 extern const uint8_t sTestCert_NodeCA_Chip[] = {
346     0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x77, 0x3d, 0x91, 0x2c, 0x61, 0xaf, 0xb7, 0x64, 0x24, 0x02, 0x01,
347     0x37, 0x03, 0x27, 0x12, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05,
348     0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x12, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24,
349     0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xcb, 0x15, 0x4e, 0x4d, 0xcf, 0xca, 0x9d, 0xb5, 0x81, 0x43, 0xf8, 0x5b, 0x5a, 0xfa, 0x50,
350     0x6f, 0x54, 0x47, 0x04, 0x7b, 0x8b, 0x4a, 0x99, 0xd2, 0x0b, 0x56, 0x47, 0x65, 0x9a, 0x09, 0x42, 0xdf, 0x04, 0xdd, 0xe4, 0xb2,
351     0x42, 0x57, 0x20, 0xe2, 0x99, 0x55, 0x15, 0x9c, 0x26, 0x38, 0x49, 0x85, 0x3d, 0x45, 0x02, 0xb0, 0x84, 0xbc, 0xad, 0xed, 0x86,
352     0x74, 0xd1, 0xdd, 0xd0, 0x4e, 0xda, 0x40, 0x35, 0x80, 0x29, 0x01, 0x18, 0x24, 0x81, 0x60, 0x30, 0x83, 0x14, 0x32, 0xe1, 0x8f,
353     0xc4, 0xae, 0x08, 0xf3, 0x20, 0x82, 0x4c, 0xe5, 0x32, 0xef, 0x74, 0x6d, 0xf4, 0xfc, 0x7f, 0x70, 0x36, 0x30, 0x84, 0x14, 0x6d,
354     0xb7, 0x5d, 0x18, 0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c, 0x84, 0xcc, 0xc8, 0xb8, 0x35, 0x0a,
355     0x30, 0x01, 0x20, 0x78, 0x2a, 0x01, 0xd8, 0x51, 0x34, 0x3b, 0x24, 0x29, 0x18, 0x4b, 0xa2, 0x4b, 0x74, 0x81, 0xb2, 0x02, 0x1d,
356     0x9c, 0xc0, 0xb4, 0xb8, 0xff, 0x5a, 0x44, 0x1a, 0x9f, 0x49, 0xe4, 0x7b, 0x09, 0x60, 0x30, 0x02, 0x21, 0x00, 0x87, 0xa1, 0xb6,
357     0xcc, 0x05, 0x5d, 0x9e, 0x1b, 0x96, 0x81, 0x29, 0x42, 0xeb, 0xa1, 0xe6, 0xcd, 0x71, 0xf4, 0x9b, 0x0f, 0x28, 0xbf, 0x57, 0x7d,
358     0xc8, 0x45, 0xe2, 0xf3, 0xf6, 0x85, 0x20, 0x83, 0x18, 0x18,
359 };
360
361 extern const uint32_t sTestCert_NodeCA_Chip_Len = sizeof(sTestCert_NodeCA_Chip);
362
363 extern const uint8_t sTestCert_NodeCA_DER[] = {
364     0x30, 0x82, 0x01, 0x9d, 0x30, 0x82, 0x01, 0x43, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x77, 0x3d, 0x91, 0x2c, 0x61, 0xaf,
365     0xb7, 0x64, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x22, 0x31, 0x20, 0x30, 0x1e, 0x06,
366     0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41,
367     0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32,
368     0x33, 0x34, 0x33, 0x5a, 0x17, 0x0d, 0x34, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32, 0x33, 0x34, 0x32, 0x5a, 0x30, 0x22,
369     0x31, 0x20, 0x30, 0x1e, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43,
370     0x41, 0x43, 0x41, 0x43, 0x41, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x32, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
371     0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xcb, 0x15,
372     0x4e, 0x4d, 0xcf, 0xca, 0x9d, 0xb5, 0x81, 0x43, 0xf8, 0x5b, 0x5a, 0xfa, 0x50, 0x6f, 0x54, 0x47, 0x04, 0x7b, 0x8b, 0x4a, 0x99,
373     0xd2, 0x0b, 0x56, 0x47, 0x65, 0x9a, 0x09, 0x42, 0xdf, 0x04, 0xdd, 0xe4, 0xb2, 0x42, 0x57, 0x20, 0xe2, 0x99, 0x55, 0x15, 0x9c,
374     0x26, 0x38, 0x49, 0x85, 0x3d, 0x45, 0x02, 0xb0, 0x84, 0xbc, 0xad, 0xed, 0x86, 0x74, 0xd1, 0xdd, 0xd0, 0x4e, 0xda, 0x40, 0xa3,
375     0x63, 0x30, 0x61, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30,
376     0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,
377     0x0e, 0x04, 0x16, 0x04, 0x14, 0x32, 0xe1, 0x8f, 0xc4, 0xae, 0x08, 0xf3, 0x20, 0x82, 0x4c, 0xe5, 0x32, 0xef, 0x74, 0x6d, 0xf4,
378     0xfc, 0x7f, 0x70, 0x36, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x6d, 0xb7, 0x5d, 0x18,
379     0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c, 0x84, 0xcc, 0xc8, 0xb8, 0x30, 0x0a, 0x06, 0x08, 0x2a,
380     0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x78, 0x2a, 0x01, 0xd8, 0x51, 0x34, 0x3b,
381     0x24, 0x29, 0x18, 0x4b, 0xa2, 0x4b, 0x74, 0x81, 0xb2, 0x02, 0x1d, 0x9c, 0xc0, 0xb4, 0xb8, 0xff, 0x5a, 0x44, 0x1a, 0x9f, 0x49,
382     0xe4, 0x7b, 0x09, 0x60, 0x02, 0x21, 0x00, 0x87, 0xa1, 0xb6, 0xcc, 0x05, 0x5d, 0x9e, 0x1b, 0x96, 0x81, 0x29, 0x42, 0xeb, 0xa1,
383     0xe6, 0xcd, 0x71, 0xf4, 0x9b, 0x0f, 0x28, 0xbf, 0x57, 0x7d, 0xc8, 0x45, 0xe2, 0xf3, 0xf6, 0x85, 0x20, 0x83,
384 };
385
386 extern const uint32_t sTestCert_NodeCA_DER_Len = sizeof(sTestCert_NodeCA_DER);
387
388 extern const uint8_t sTestCert_NodeCA_PublicKey[] = {
389     0x04, 0xcb, 0x15, 0x4e, 0x4d, 0xcf, 0xca, 0x9d, 0xb5, 0x81, 0x43, 0xf8, 0x5b, 0x5a, 0xfa, 0x50, 0x6f,
390     0x54, 0x47, 0x04, 0x7b, 0x8b, 0x4a, 0x99, 0xd2, 0x0b, 0x56, 0x47, 0x65, 0x9a, 0x09, 0x42, 0xdf, 0x04,
391     0xdd, 0xe4, 0xb2, 0x42, 0x57, 0x20, 0xe2, 0x99, 0x55, 0x15, 0x9c, 0x26, 0x38, 0x49, 0x85, 0x3d, 0x45,
392     0x02, 0xb0, 0x84, 0xbc, 0xad, 0xed, 0x86, 0x74, 0xd1, 0xdd, 0xd0, 0x4e, 0xda, 0x40,
393 };
394
395 extern const uint8_t sTestCert_NodeCA_PublicKey_Len = sizeof(sTestCert_NodeCA_PublicKey);
396
397 extern const uint8_t sTestCert_NodeCA_PrivateKey[] = {
398     0x8b, 0xc9, 0xe5, 0xb7, 0x3c, 0x07, 0x03, 0xb0, 0xa4, 0xd7, 0xdb, 0xb4, 0x56, 0x7a, 0xe0, 0x7b,
399     0xe8, 0x79, 0xe4, 0xa1, 0xfd, 0xae, 0xf1, 0xc2, 0x57, 0x1c, 0x73, 0x93, 0x7c, 0xa8, 0x9e, 0xcf,
400 };
401
402 extern const uint8_t sTestCert_NodeCA_PrivateKey_Len = sizeof(sTestCert_NodeCA_PrivateKey);
403
404 extern const uint8_t sTestCert_NodeCA_SubjectKeyId[] = {
405     0x32, 0xE1, 0x8F, 0xC4, 0xAE, 0x08, 0xF3, 0x20, 0x82, 0x4C, 0xE5, 0x32, 0xEF, 0x74, 0x6D, 0xF4, 0xFC, 0x7F, 0x70, 0x36,
406 };
407
408 extern const uint8_t sTestCert_NodeCA_SubjectKeyId_Len = sizeof(sTestCert_NodeCA_SubjectKeyId);
409
410 extern const uint64_t sTestCert_NodeCA_Id = 0xCACACACA00000002ULL;
411
412 /**************  Test Node01 Certificate  **************
413 Certificate:
414     Data:
415         Version: 3 (0x2)
416         Serial Number: 8443031728966314921 (0x752bac9fd863aba9)
417         Signature Algorithm: ecdsa-with-SHA256
418         Issuer: 1.3.6.1.4.1.37244.1.2 = CACACACA00000002
419         Validity
420             Not Before: Oct 15 14:23:43 2020 GMT
421             Not After : Oct 15 14:23:42 2040 GMT
422         Subject: 1.3.6.1.4.1.37244.1.1 = DEDEDEDE00000001
423         Subject Public Key Info:
424             Public Key Algorithm: id-ecPublicKey
425                 Public-Key: (256 bit)
426                 pub:
427                     04:36:6a:7f:6c:f4:f0:5a:13:d8:35:4e:e0:ba:c4:
428                     e0:f0:ac:f1:8b:06:8d:a1:a2:ef:f8:77:85:e1:dc:
429                     10:aa:0b:cc:c1:1c:68:e8:84:65:c1:62:d9:50:b7:
430                     df:9c:da:e8:d3:5c:bb:65:2d:03:7d:8e:0a:22:e3:
431                     79:5f:1e:ef:ee
432                 ASN1 OID: prime256v1
433                 NIST CURVE: P-256
434         X509v3 extensions:
435             X509v3 Basic Constraints: critical
436                 CA:FALSE
437             X509v3 Key Usage: critical
438                 Digital Signature, Key Encipherment
439             X509v3 Extended Key Usage: critical
440                 TLS Web Client Authentication, TLS Web Server Authentication
441             X509v3 Subject Key Identifier:
442                 24:02:56:C0:9E:BB:67:FE:40:12:9A:B5:9F:2B:CB:33:3A:4E:7C:3E
443             X509v3 Authority Key Identifier:
444                 keyid:32:E1:8F:C4:AE:08:F3:20:82:4C:E5:32:EF:74:6D:F4:FC:7F:70:36
445
446     Signature Algorithm: ecdsa-with-SHA256
447          30:45:02:21:00:87:26:0e:3d:82:7e:da:2e:b9:da:86:41:15:
448          9b:c4:de:2c:34:c6:83:5f:49:9a:27:59:94:3c:bb:b9:95:98:
449          59:02:20:61:09:4f:d3:71:61:a7:ea:29:f9:04:14:71:51:2b:
450          aa:1f:b0:6b:b9:91:8c:3f:99:73:d7:64:61:0a:34:68:72
451
452 -----BEGIN CERTIFICATE-----
453 MIIBvjCCAWSgAwIBAgIIdSusn9hjq6kwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB
454 gqJ8AQIMEENBQ0FDQUNBMDAwMDAwMDIwHhcNMjAxMDE1MTQyMzQzWhcNNDAxMDE1
455 MTQyMzQyWjAiMSAwHgYKKwYBBAGConwBAQwQREVERURFREUwMDAwMDAwMTBZMBMG
456 ByqGSM49AgEGCCqGSM49AwEHA0IABDZqf2z08FoT2DVO4LrE4PCs8YsGjaGi7/h3
457 heHcEKoLzMEcaOiEZcFi2VC335za6NNcu2UtA32OCiLjeV8e7+6jgYMwgYAwDAYD
458 VR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCBaAwIAYDVR0lAQH/BBYwFAYIKwYBBQUH
459 AwIGCCsGAQUFBwMBMB0GA1UdDgQWBBQkAlbAnrtn/kASmrWfK8szOk58PjAfBgNV
460 HSMEGDAWgBQy4Y/ErgjzIIJM5TLvdG30/H9wNjAKBggqhkjOPQQDAgNIADBFAiEA
461 hyYOPYJ+2i652oZBFZvE3iw0xoNfSZonWZQ8u7mVmFkCIGEJT9NxYafqKfkEFHFR
462 K6ofsGu5kYw/mXPXZGEKNGhy
463 -----END CERTIFICATE-----
464
465 -----BEGIN EC PRIVATE KEY-----
466 MHcCAQEEIARx4RR05GVpkDf6NwcNoHUjVXSBgnsBxce3KYb40VRhoAoGCCqGSM49
467 AwEHoUQDQgAENmp/bPTwWhPYNU7gusTg8KzxiwaNoaLv+HeF4dwQqgvMwRxo6IRl
468 wWLZULffnNro01y7ZS0DfY4KIuN5Xx7v7g==
469 -----END EC PRIVATE KEY-----
470 */
471
472 extern const uint8_t sTestCert_Node01_Chip[] = {
473     0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x75, 0x2b, 0xac, 0x9f, 0xd8, 0x63, 0xab, 0xa9, 0x24, 0x02, 0x01,
474     0x37, 0x03, 0x27, 0x12, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05,
475     0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0x00, 0x00, 0xde, 0xde, 0xde, 0xde, 0x18, 0x24, 0x07, 0x01, 0x24,
476     0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x36, 0x6a, 0x7f, 0x6c, 0xf4, 0xf0, 0x5a, 0x13, 0xd8, 0x35, 0x4e, 0xe0, 0xba, 0xc4, 0xe0,
477     0xf0, 0xac, 0xf1, 0x8b, 0x06, 0x8d, 0xa1, 0xa2, 0xef, 0xf8, 0x77, 0x85, 0xe1, 0xdc, 0x10, 0xaa, 0x0b, 0xcc, 0xc1, 0x1c, 0x68,
478     0xe8, 0x84, 0x65, 0xc1, 0x62, 0xd9, 0x50, 0xb7, 0xdf, 0x9c, 0xda, 0xe8, 0xd3, 0x5c, 0xbb, 0x65, 0x2d, 0x03, 0x7d, 0x8e, 0x0a,
479     0x22, 0xe3, 0x79, 0x5f, 0x1e, 0xef, 0xee, 0x35, 0x80, 0x28, 0x01, 0x18, 0x24, 0x81, 0x05, 0x36, 0x82, 0x04, 0x02, 0x04, 0x01,
480     0x18, 0x30, 0x83, 0x14, 0x24, 0x02, 0x56, 0xc0, 0x9e, 0xbb, 0x67, 0xfe, 0x40, 0x12, 0x9a, 0xb5, 0x9f, 0x2b, 0xcb, 0x33, 0x3a,
481     0x4e, 0x7c, 0x3e, 0x30, 0x84, 0x14, 0x32, 0xe1, 0x8f, 0xc4, 0xae, 0x08, 0xf3, 0x20, 0x82, 0x4c, 0xe5, 0x32, 0xef, 0x74, 0x6d,
482     0xf4, 0xfc, 0x7f, 0x70, 0x36, 0x35, 0x0a, 0x30, 0x01, 0x21, 0x00, 0x87, 0x26, 0x0e, 0x3d, 0x82, 0x7e, 0xda, 0x2e, 0xb9, 0xda,
483     0x86, 0x41, 0x15, 0x9b, 0xc4, 0xde, 0x2c, 0x34, 0xc6, 0x83, 0x5f, 0x49, 0x9a, 0x27, 0x59, 0x94, 0x3c, 0xbb, 0xb9, 0x95, 0x98,
484     0x59, 0x30, 0x02, 0x20, 0x61, 0x09, 0x4f, 0xd3, 0x71, 0x61, 0xa7, 0xea, 0x29, 0xf9, 0x04, 0x14, 0x71, 0x51, 0x2b, 0xaa, 0x1f,
485     0xb0, 0x6b, 0xb9, 0x91, 0x8c, 0x3f, 0x99, 0x73, 0xd7, 0x64, 0x61, 0x0a, 0x34, 0x68, 0x72, 0x18, 0x18,
486 };
487
488 extern const uint32_t sTestCert_Node01_Chip_Len = sizeof(sTestCert_Node01_Chip);
489
490 extern const uint8_t sTestCert_Node01_DER[] = {
491     0x30, 0x82, 0x01, 0xbe, 0x30, 0x82, 0x01, 0x64, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x75, 0x2b, 0xac, 0x9f, 0xd8, 0x63,
492     0xab, 0xa9, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x22, 0x31, 0x20, 0x30, 0x1e, 0x06,
493     0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41,
494     0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x32, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32,
495     0x33, 0x34, 0x33, 0x5a, 0x17, 0x0d, 0x34, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32, 0x33, 0x34, 0x32, 0x5a, 0x30, 0x22,
496     0x31, 0x20, 0x30, 0x1e, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x01, 0x0c, 0x10, 0x44, 0x45, 0x44,
497     0x45, 0x44, 0x45, 0x44, 0x45, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
498     0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x36, 0x6a,
499     0x7f, 0x6c, 0xf4, 0xf0, 0x5a, 0x13, 0xd8, 0x35, 0x4e, 0xe0, 0xba, 0xc4, 0xe0, 0xf0, 0xac, 0xf1, 0x8b, 0x06, 0x8d, 0xa1, 0xa2,
500     0xef, 0xf8, 0x77, 0x85, 0xe1, 0xdc, 0x10, 0xaa, 0x0b, 0xcc, 0xc1, 0x1c, 0x68, 0xe8, 0x84, 0x65, 0xc1, 0x62, 0xd9, 0x50, 0xb7,
501     0xdf, 0x9c, 0xda, 0xe8, 0xd3, 0x5c, 0xbb, 0x65, 0x2d, 0x03, 0x7d, 0x8e, 0x0a, 0x22, 0xe3, 0x79, 0x5f, 0x1e, 0xef, 0xee, 0xa3,
502     0x81, 0x83, 0x30, 0x81, 0x80, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e,
503     0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x05, 0xa0, 0x30, 0x20, 0x06, 0x03, 0x55, 0x1d, 0x25,
504     0x01, 0x01, 0xff, 0x04, 0x16, 0x30, 0x14, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x06, 0x08, 0x2b, 0x06,
505     0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x24, 0x02, 0x56, 0xc0,
506     0x9e, 0xbb, 0x67, 0xfe, 0x40, 0x12, 0x9a, 0xb5, 0x9f, 0x2b, 0xcb, 0x33, 0x3a, 0x4e, 0x7c, 0x3e, 0x30, 0x1f, 0x06, 0x03, 0x55,
507     0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x32, 0xe1, 0x8f, 0xc4, 0xae, 0x08, 0xf3, 0x20, 0x82, 0x4c, 0xe5, 0x32, 0xef,
508     0x74, 0x6d, 0xf4, 0xfc, 0x7f, 0x70, 0x36, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48,
509     0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0x87, 0x26, 0x0e, 0x3d, 0x82, 0x7e, 0xda, 0x2e, 0xb9, 0xda, 0x86, 0x41, 0x15, 0x9b, 0xc4,
510     0xde, 0x2c, 0x34, 0xc6, 0x83, 0x5f, 0x49, 0x9a, 0x27, 0x59, 0x94, 0x3c, 0xbb, 0xb9, 0x95, 0x98, 0x59, 0x02, 0x20, 0x61, 0x09,
511     0x4f, 0xd3, 0x71, 0x61, 0xa7, 0xea, 0x29, 0xf9, 0x04, 0x14, 0x71, 0x51, 0x2b, 0xaa, 0x1f, 0xb0, 0x6b, 0xb9, 0x91, 0x8c, 0x3f,
512     0x99, 0x73, 0xd7, 0x64, 0x61, 0x0a, 0x34, 0x68, 0x72,
513 };
514
515 extern const uint32_t sTestCert_Node01_DER_Len = sizeof(sTestCert_Node01_DER);
516
517 extern const uint8_t sTestCert_Node01_PublicKey[] = {
518     0x04, 0x36, 0x6a, 0x7f, 0x6c, 0xf4, 0xf0, 0x5a, 0x13, 0xd8, 0x35, 0x4e, 0xe0, 0xba, 0xc4, 0xe0, 0xf0,
519     0xac, 0xf1, 0x8b, 0x06, 0x8d, 0xa1, 0xa2, 0xef, 0xf8, 0x77, 0x85, 0xe1, 0xdc, 0x10, 0xaa, 0x0b, 0xcc,
520     0xc1, 0x1c, 0x68, 0xe8, 0x84, 0x65, 0xc1, 0x62, 0xd9, 0x50, 0xb7, 0xdf, 0x9c, 0xda, 0xe8, 0xd3, 0x5c,
521     0xbb, 0x65, 0x2d, 0x03, 0x7d, 0x8e, 0x0a, 0x22, 0xe3, 0x79, 0x5f, 0x1e, 0xef, 0xee,
522 };
523
524 extern const uint8_t sTestCert_Node01_PublicKey_Len = sizeof(sTestCert_Node01_PublicKey);
525
526 extern const uint8_t sTestCert_Node01_PrivateKey[] = {
527     0x04, 0x71, 0xe1, 0x14, 0x74, 0xe4, 0x65, 0x69, 0x90, 0x37, 0xfa, 0x37, 0x07, 0x0d, 0xa0, 0x75,
528     0x23, 0x55, 0x74, 0x81, 0x82, 0x7b, 0x01, 0xc5, 0xc7, 0xb7, 0x29, 0x86, 0xf8, 0xd1, 0x54, 0x61,
529 };
530
531 extern const uint8_t sTestCert_Node01_PrivateKey_Len = sizeof(sTestCert_Node01_PrivateKey);
532
533 extern const uint8_t sTestCert_Node01_SubjectKeyId[] = {
534     0x24, 0x02, 0x56, 0xC0, 0x9E, 0xBB, 0x67, 0xFE, 0x40, 0x12, 0x9A, 0xB5, 0x9F, 0x2B, 0xCB, 0x33, 0x3A, 0x4E, 0x7C, 0x3E,
535 };
536
537 extern const uint8_t sTestCert_Node01_SubjectKeyId_Len = sizeof(sTestCert_Node01_SubjectKeyId);
538
539 extern const uint64_t sTestCert_Node01_Id = 0xDEDEDEDE00000001ULL;
540
541 /**************  Test FirmwareSigningCA Certificate  **************
542 Certificate:
543     Data:
544         Version: 3 (0x2)
545         Serial Number: 7496684316852547800 (0x680992aac33cf0d8)
546         Signature Algorithm: ecdsa-with-SHA256
547         Issuer: 1.3.6.1.4.1.37244.1.2 = CACACACA00000001
548         Validity
549             Not Before: Oct 15 14:23:43 2020 GMT
550             Not After : Oct 15 14:23:42 2040 GMT
551         Subject: 1.3.6.1.4.1.37244.1.2 = CACACACA00000004
552         Subject Public Key Info:
553             Public Key Algorithm: id-ecPublicKey
554                 Public-Key: (256 bit)
555                 pub:
556                     04:0e:c3:7d:d2:c7:3a:d8:c3:fd:79:a8:e4:df:10:
557                     70:84:0e:99:94:88:75:46:ee:69:11:60:fb:5a:c6:
558                     a4:83:fe:a6:21:b3:05:17:3c:f3:f9:2d:00:39:4f:
559                     f3:f2:23:7e:d2:dc:36:78:4a:ec:be:20:69:9b:be:
560                     77:cf:96:67:6b
561                 ASN1 OID: prime256v1
562                 NIST CURVE: P-256
563         X509v3 extensions:
564             X509v3 Basic Constraints: critical
565                 CA:TRUE
566             X509v3 Key Usage: critical
567                 Certificate Sign, CRL Sign
568             X509v3 Subject Key Identifier:
569                 E3:93:CD:A5:07:BB:8D:34:32:6F:10:E5:DB:85:42:75:E0:01:8D:DD
570             X509v3 Authority Key Identifier:
571                 keyid:6D:B7:5D:18:AF:31:5D:00:53:F0:57:96:39:6A:AA:4C:84:CC:C8:B8
572
573     Signature Algorithm: ecdsa-with-SHA256
574          30:45:02:20:69:dc:64:74:1f:70:40:ce:f4:23:df:96:fc:d2:
575          00:92:bb:2f:26:ef:b5:95:06:86:62:9f:00:b9:98:f4:28:f8:
576          02:21:00:c9:c2:5b:f5:47:ff:7c:2a:eb:0e:db:a6:7a:c4:e0:
577          07:b3:20:df:67:09:d7:14:39:66:af:ff:e1:fd:77:e9:6e
578
579 -----BEGIN CERTIFICATE-----
580 MIIBnTCCAUOgAwIBAgIIaAmSqsM88NgwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB
581 gqJ8AQIMEENBQ0FDQUNBMDAwMDAwMDEwHhcNMjAxMDE1MTQyMzQzWhcNNDAxMDE1
582 MTQyMzQyWjAiMSAwHgYKKwYBBAGConwBAgwQQ0FDQUNBQ0EwMDAwMDAwNDBZMBMG
583 ByqGSM49AgEGCCqGSM49AwEHA0IABA7DfdLHOtjD/Xmo5N8QcIQOmZSIdUbuaRFg
584 +1rGpIP+piGzBRc88/ktADlP8/IjftLcNnhK7L4gaZu+d8+WZ2ujYzBhMA8GA1Ud
585 EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjk82lB7uNNDJv
586 EOXbhUJ14AGN3TAfBgNVHSMEGDAWgBRtt10YrzFdAFPwV5Y5aqpMhMzIuDAKBggq
587 hkjOPQQDAgNIADBFAiBp3GR0H3BAzvQj35b80gCSuy8m77WVBoZinwC5mPQo+AIh
588 AMnCW/VH/3wq6w7bpnrE4AezIN9nCdcUOWav/+H9d+lu
589 -----END CERTIFICATE-----
590
591 -----BEGIN EC PRIVATE KEY-----
592 MHcCAQEEIHK8Q/yRkiNSQKJpgNAAiiAtjIalSkYMV5S0J+ffdqkXoAoGCCqGSM49
593 AwEHoUQDQgAEDsN90sc62MP9eajk3xBwhA6ZlIh1Ru5pEWD7Wsakg/6mIbMFFzzz
594 +S0AOU/z8iN+0tw2eErsviBpm753z5Znaw==
595 -----END EC PRIVATE KEY-----
596 */
597
598 extern const uint8_t sTestCert_FirmwareSigningCA_Chip[] = {
599     0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x68, 0x09, 0x92, 0xaa, 0xc3, 0x3c, 0xf0, 0xd8, 0x24, 0x02, 0x01,
600     0x37, 0x03, 0x27, 0x12, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05,
601     0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x12, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24,
602     0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x0e, 0xc3, 0x7d, 0xd2, 0xc7, 0x3a, 0xd8, 0xc3, 0xfd, 0x79, 0xa8, 0xe4, 0xdf, 0x10, 0x70,
603     0x84, 0x0e, 0x99, 0x94, 0x88, 0x75, 0x46, 0xee, 0x69, 0x11, 0x60, 0xfb, 0x5a, 0xc6, 0xa4, 0x83, 0xfe, 0xa6, 0x21, 0xb3, 0x05,
604     0x17, 0x3c, 0xf3, 0xf9, 0x2d, 0x00, 0x39, 0x4f, 0xf3, 0xf2, 0x23, 0x7e, 0xd2, 0xdc, 0x36, 0x78, 0x4a, 0xec, 0xbe, 0x20, 0x69,
605     0x9b, 0xbe, 0x77, 0xcf, 0x96, 0x67, 0x6b, 0x35, 0x80, 0x29, 0x01, 0x18, 0x24, 0x81, 0x60, 0x30, 0x83, 0x14, 0xe3, 0x93, 0xcd,
606     0xa5, 0x07, 0xbb, 0x8d, 0x34, 0x32, 0x6f, 0x10, 0xe5, 0xdb, 0x85, 0x42, 0x75, 0xe0, 0x01, 0x8d, 0xdd, 0x30, 0x84, 0x14, 0x6d,
607     0xb7, 0x5d, 0x18, 0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c, 0x84, 0xcc, 0xc8, 0xb8, 0x35, 0x0a,
608     0x30, 0x01, 0x20, 0x69, 0xdc, 0x64, 0x74, 0x1f, 0x70, 0x40, 0xce, 0xf4, 0x23, 0xdf, 0x96, 0xfc, 0xd2, 0x00, 0x92, 0xbb, 0x2f,
609     0x26, 0xef, 0xb5, 0x95, 0x06, 0x86, 0x62, 0x9f, 0x00, 0xb9, 0x98, 0xf4, 0x28, 0xf8, 0x30, 0x02, 0x21, 0x00, 0xc9, 0xc2, 0x5b,
610     0xf5, 0x47, 0xff, 0x7c, 0x2a, 0xeb, 0x0e, 0xdb, 0xa6, 0x7a, 0xc4, 0xe0, 0x07, 0xb3, 0x20, 0xdf, 0x67, 0x09, 0xd7, 0x14, 0x39,
611     0x66, 0xaf, 0xff, 0xe1, 0xfd, 0x77, 0xe9, 0x6e, 0x18, 0x18,
612 };
613
614 extern const uint32_t sTestCert_FirmwareSigningCA_Chip_Len = sizeof(sTestCert_FirmwareSigningCA_Chip);
615
616 extern const uint8_t sTestCert_FirmwareSigningCA_DER[] = {
617     0x30, 0x82, 0x01, 0x9d, 0x30, 0x82, 0x01, 0x43, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x68, 0x09, 0x92, 0xaa, 0xc3, 0x3c,
618     0xf0, 0xd8, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x22, 0x31, 0x20, 0x30, 0x1e, 0x06,
619     0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41,
620     0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32,
621     0x33, 0x34, 0x33, 0x5a, 0x17, 0x0d, 0x34, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32, 0x33, 0x34, 0x32, 0x5a, 0x30, 0x22,
622     0x31, 0x20, 0x30, 0x1e, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43,
623     0x41, 0x43, 0x41, 0x43, 0x41, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
624     0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x0e, 0xc3,
625     0x7d, 0xd2, 0xc7, 0x3a, 0xd8, 0xc3, 0xfd, 0x79, 0xa8, 0xe4, 0xdf, 0x10, 0x70, 0x84, 0x0e, 0x99, 0x94, 0x88, 0x75, 0x46, 0xee,
626     0x69, 0x11, 0x60, 0xfb, 0x5a, 0xc6, 0xa4, 0x83, 0xfe, 0xa6, 0x21, 0xb3, 0x05, 0x17, 0x3c, 0xf3, 0xf9, 0x2d, 0x00, 0x39, 0x4f,
627     0xf3, 0xf2, 0x23, 0x7e, 0xd2, 0xdc, 0x36, 0x78, 0x4a, 0xec, 0xbe, 0x20, 0x69, 0x9b, 0xbe, 0x77, 0xcf, 0x96, 0x67, 0x6b, 0xa3,
628     0x63, 0x30, 0x61, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30,
629     0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,
630     0x0e, 0x04, 0x16, 0x04, 0x14, 0xe3, 0x93, 0xcd, 0xa5, 0x07, 0xbb, 0x8d, 0x34, 0x32, 0x6f, 0x10, 0xe5, 0xdb, 0x85, 0x42, 0x75,
631     0xe0, 0x01, 0x8d, 0xdd, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x6d, 0xb7, 0x5d, 0x18,
632     0xaf, 0x31, 0x5d, 0x00, 0x53, 0xf0, 0x57, 0x96, 0x39, 0x6a, 0xaa, 0x4c, 0x84, 0xcc, 0xc8, 0xb8, 0x30, 0x0a, 0x06, 0x08, 0x2a,
633     0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x69, 0xdc, 0x64, 0x74, 0x1f, 0x70, 0x40,
634     0xce, 0xf4, 0x23, 0xdf, 0x96, 0xfc, 0xd2, 0x00, 0x92, 0xbb, 0x2f, 0x26, 0xef, 0xb5, 0x95, 0x06, 0x86, 0x62, 0x9f, 0x00, 0xb9,
635     0x98, 0xf4, 0x28, 0xf8, 0x02, 0x21, 0x00, 0xc9, 0xc2, 0x5b, 0xf5, 0x47, 0xff, 0x7c, 0x2a, 0xeb, 0x0e, 0xdb, 0xa6, 0x7a, 0xc4,
636     0xe0, 0x07, 0xb3, 0x20, 0xdf, 0x67, 0x09, 0xd7, 0x14, 0x39, 0x66, 0xaf, 0xff, 0xe1, 0xfd, 0x77, 0xe9, 0x6e,
637 };
638
639 extern const uint32_t sTestCert_FirmwareSigningCA_DER_Len = sizeof(sTestCert_FirmwareSigningCA_DER);
640
641 extern const uint8_t sTestCert_FirmwareSigningCA_PublicKey[] = {
642     0x04, 0x0e, 0xc3, 0x7d, 0xd2, 0xc7, 0x3a, 0xd8, 0xc3, 0xfd, 0x79, 0xa8, 0xe4, 0xdf, 0x10, 0x70, 0x84,
643     0x0e, 0x99, 0x94, 0x88, 0x75, 0x46, 0xee, 0x69, 0x11, 0x60, 0xfb, 0x5a, 0xc6, 0xa4, 0x83, 0xfe, 0xa6,
644     0x21, 0xb3, 0x05, 0x17, 0x3c, 0xf3, 0xf9, 0x2d, 0x00, 0x39, 0x4f, 0xf3, 0xf2, 0x23, 0x7e, 0xd2, 0xdc,
645     0x36, 0x78, 0x4a, 0xec, 0xbe, 0x20, 0x69, 0x9b, 0xbe, 0x77, 0xcf, 0x96, 0x67, 0x6b,
646 };
647
648 extern const uint8_t sTestCert_FirmwareSigningCA_PublicKey_Len = sizeof(sTestCert_FirmwareSigningCA_PublicKey);
649
650 extern const uint8_t sTestCert_FirmwareSigningCA_PrivateKey[] = {
651     0x72, 0xbc, 0x43, 0xfc, 0x91, 0x92, 0x23, 0x52, 0x40, 0xa2, 0x69, 0x80, 0xd0, 0x00, 0x8a, 0x20,
652     0x2d, 0x8c, 0x86, 0xa5, 0x4a, 0x46, 0x0c, 0x57, 0x94, 0xb4, 0x27, 0xe7, 0xdf, 0x76, 0xa9, 0x17,
653 };
654
655 extern const uint8_t sTestCert_FirmwareSigningCA_PrivateKey_Len = sizeof(sTestCert_FirmwareSigningCA_PrivateKey);
656
657 extern const uint8_t sTestCert_FirmwareSigningCA_SubjectKeyId[] = {
658     0xE3, 0x93, 0xCD, 0xA5, 0x07, 0xBB, 0x8D, 0x34, 0x32, 0x6F, 0x10, 0xE5, 0xDB, 0x85, 0x42, 0x75, 0xE0, 0x01, 0x8D, 0xDD,
659 };
660
661 extern const uint8_t sTestCert_FirmwareSigningCA_SubjectKeyId_Len = sizeof(sTestCert_FirmwareSigningCA_SubjectKeyId);
662
663 extern const uint64_t sTestCert_FirmwareSigningCA_Id = 0xCACACACA00000004ULL;
664
665 /**************  Test FirmwareSigning Certificate  **************
666 Certificate:
667     Data:
668         Version: 3 (0x2)
669         Serial Number: 6676345961617462715 (0x5ca725477fd295bb)
670         Signature Algorithm: ecdsa-with-SHA256
671         Issuer: 1.3.6.1.4.1.37244.1.2 = CACACACA00000004
672         Validity
673             Not Before: Oct 15 14:23:43 2020 GMT
674             Not After : Oct 15 14:23:42 2040 GMT
675         Subject: 1.3.6.1.4.1.37244.1.3 = FFFFFFFF00000001
676         Subject Public Key Info:
677             Public Key Algorithm: id-ecPublicKey
678                 Public-Key: (256 bit)
679                 pub:
680                     04:c3:c4:61:40:51:3f:6a:a5:95:54:33:a4:f0:89:
681                     42:2e:fc:72:ae:c5:21:08:94:42:9c:f5:4d:d3:31:
682                     2a:82:55:46:42:2c:cc:29:b9:8e:cc:8b:dd:34:38:
683                     a8:3f:a7:3f:ac:c7:ff:bd:a7:25:40:6e:ab:f8:4e:
684                     20:ec:27:47:60
685                 ASN1 OID: prime256v1
686                 NIST CURVE: P-256
687         X509v3 extensions:
688             X509v3 Basic Constraints: critical
689                 CA:FALSE
690             X509v3 Key Usage: critical
691                 Digital Signature
692             X509v3 Extended Key Usage: critical
693                 Code Signing
694             X509v3 Subject Key Identifier:
695                 C7:93:14:3D:D2:86:46:41:F2:B9:6D:84:17:A9:98:19:37:48:8A:07
696             X509v3 Authority Key Identifier:
697                 keyid:E3:93:CD:A5:07:BB:8D:34:32:6F:10:E5:DB:85:42:75:E0:01:8D:DD
698
699     Signature Algorithm: ecdsa-with-SHA256
700          30:46:02:21:00:98:2f:d0:38:cc:fc:7b:51:92:03:f3:08:28:
701          a0:03:d8:80:55:98:25:e5:1d:45:d6:05:c2:e5:b6:09:ad:58:
702          b2:02:21:00:fc:41:54:b2:d6:66:75:08:c7:0f:21:30:b3:ee:
703          aa:49:c8:7b:71:d8:99:71:69:36:bb:47:66:9e:ed:86:6b:83
704
705 -----BEGIN CERTIFICATE-----
706 MIIBszCCAVigAwIBAgIIXKclR3/SlbswCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB
707 gqJ8AQIMEENBQ0FDQUNBMDAwMDAwMDQwHhcNMjAxMDE1MTQyMzQzWhcNNDAxMDE1
708 MTQyMzQyWjAiMSAwHgYKKwYBBAGConwBAwwQRkZGRkZGRkYwMDAwMDAwMTBZMBMG
709 ByqGSM49AgEGCCqGSM49AwEHA0IABMPEYUBRP2qllVQzpPCJQi78cq7FIQiUQpz1
710 TdMxKoJVRkIszCm5jsyL3TQ4qD+nP6zH/72nJUBuq/hOIOwnR2CjeDB2MAwGA1Ud
711 EwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMD
712 MB0GA1UdDgQWBBTHkxQ90oZGQfK5bYQXqZgZN0iKBzAfBgNVHSMEGDAWgBTjk82l
713 B7uNNDJvEOXbhUJ14AGN3TAKBggqhkjOPQQDAgNJADBGAiEAmC/QOMz8e1GSA/MI
714 KKAD2IBVmCXlHUXWBcLltgmtWLICIQD8QVSy1mZ1CMcPITCz7qpJyHtx2JlxaTa7
715 R2ae7YZrgw==
716 -----END CERTIFICATE-----
717
718 -----BEGIN EC PRIVATE KEY-----
719 MHcCAQEEIDJzWtc2M3wQuNNlR9zaN7qn/jfyqbF9R1Xtcx33M1F0oAoGCCqGSM49
720 AwEHoUQDQgAEw8RhQFE/aqWVVDOk8IlCLvxyrsUhCJRCnPVN0zEqglVGQizMKbmO
721 zIvdNDioP6c/rMf/vaclQG6r+E4g7CdHYA==
722 -----END EC PRIVATE KEY-----
723 */
724
725 extern const uint8_t sTestCert_FirmwareSigning_Chip[] = {
726     0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x5c, 0xa7, 0x25, 0x47, 0x7f, 0xd2, 0x95, 0xbb, 0x24, 0x02, 0x01,
727     0x37, 0x03, 0x27, 0x12, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05,
728     0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x18, 0x24, 0x07, 0x01, 0x24,
729     0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xc3, 0xc4, 0x61, 0x40, 0x51, 0x3f, 0x6a, 0xa5, 0x95, 0x54, 0x33, 0xa4, 0xf0, 0x89, 0x42,
730     0x2e, 0xfc, 0x72, 0xae, 0xc5, 0x21, 0x08, 0x94, 0x42, 0x9c, 0xf5, 0x4d, 0xd3, 0x31, 0x2a, 0x82, 0x55, 0x46, 0x42, 0x2c, 0xcc,
731     0x29, 0xb9, 0x8e, 0xcc, 0x8b, 0xdd, 0x34, 0x38, 0xa8, 0x3f, 0xa7, 0x3f, 0xac, 0xc7, 0xff, 0xbd, 0xa7, 0x25, 0x40, 0x6e, 0xab,
732     0xf8, 0x4e, 0x20, 0xec, 0x27, 0x47, 0x60, 0x35, 0x80, 0x28, 0x01, 0x18, 0x24, 0x81, 0x01, 0x36, 0x82, 0x04, 0x03, 0x18, 0x30,
733     0x83, 0x14, 0xc7, 0x93, 0x14, 0x3d, 0xd2, 0x86, 0x46, 0x41, 0xf2, 0xb9, 0x6d, 0x84, 0x17, 0xa9, 0x98, 0x19, 0x37, 0x48, 0x8a,
734     0x07, 0x30, 0x84, 0x14, 0xe3, 0x93, 0xcd, 0xa5, 0x07, 0xbb, 0x8d, 0x34, 0x32, 0x6f, 0x10, 0xe5, 0xdb, 0x85, 0x42, 0x75, 0xe0,
735     0x01, 0x8d, 0xdd, 0x35, 0x0a, 0x30, 0x01, 0x21, 0x00, 0x98, 0x2f, 0xd0, 0x38, 0xcc, 0xfc, 0x7b, 0x51, 0x92, 0x03, 0xf3, 0x08,
736     0x28, 0xa0, 0x03, 0xd8, 0x80, 0x55, 0x98, 0x25, 0xe5, 0x1d, 0x45, 0xd6, 0x05, 0xc2, 0xe5, 0xb6, 0x09, 0xad, 0x58, 0xb2, 0x30,
737     0x02, 0x21, 0x00, 0xfc, 0x41, 0x54, 0xb2, 0xd6, 0x66, 0x75, 0x08, 0xc7, 0x0f, 0x21, 0x30, 0xb3, 0xee, 0xaa, 0x49, 0xc8, 0x7b,
738     0x71, 0xd8, 0x99, 0x71, 0x69, 0x36, 0xbb, 0x47, 0x66, 0x9e, 0xed, 0x86, 0x6b, 0x83, 0x18, 0x18,
739 };
740
741 extern const uint32_t sTestCert_FirmwareSigning_Chip_Len = sizeof(sTestCert_FirmwareSigning_Chip);
742
743 extern const uint8_t sTestCert_FirmwareSigning_DER[] = {
744     0x30, 0x82, 0x01, 0xb3, 0x30, 0x82, 0x01, 0x58, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x5c, 0xa7, 0x25, 0x47, 0x7f, 0xd2,
745     0x95, 0xbb, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x22, 0x31, 0x20, 0x30, 0x1e, 0x06,
746     0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x02, 0x0c, 0x10, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41, 0x43, 0x41,
747     0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32,
748     0x33, 0x34, 0x33, 0x5a, 0x17, 0x0d, 0x34, 0x30, 0x31, 0x30, 0x31, 0x35, 0x31, 0x34, 0x32, 0x33, 0x34, 0x32, 0x5a, 0x30, 0x22,
749     0x31, 0x20, 0x30, 0x1e, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x01, 0x03, 0x0c, 0x10, 0x46, 0x46, 0x46,
750     0x46, 0x46, 0x46, 0x46, 0x46, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
751     0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xc3, 0xc4,
752     0x61, 0x40, 0x51, 0x3f, 0x6a, 0xa5, 0x95, 0x54, 0x33, 0xa4, 0xf0, 0x89, 0x42, 0x2e, 0xfc, 0x72, 0xae, 0xc5, 0x21, 0x08, 0x94,
753     0x42, 0x9c, 0xf5, 0x4d, 0xd3, 0x31, 0x2a, 0x82, 0x55, 0x46, 0x42, 0x2c, 0xcc, 0x29, 0xb9, 0x8e, 0xcc, 0x8b, 0xdd, 0x34, 0x38,
754     0xa8, 0x3f, 0xa7, 0x3f, 0xac, 0xc7, 0xff, 0xbd, 0xa7, 0x25, 0x40, 0x6e, 0xab, 0xf8, 0x4e, 0x20, 0xec, 0x27, 0x47, 0x60, 0xa3,
755     0x78, 0x30, 0x76, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03,
756     0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x16, 0x06, 0x03, 0x55, 0x1d, 0x25, 0x01, 0x01,
757     0xff, 0x04, 0x0c, 0x30, 0x0a, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x03, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,
758     0x0e, 0x04, 0x16, 0x04, 0x14, 0xc7, 0x93, 0x14, 0x3d, 0xd2, 0x86, 0x46, 0x41, 0xf2, 0xb9, 0x6d, 0x84, 0x17, 0xa9, 0x98, 0x19,
759     0x37, 0x48, 0x8a, 0x07, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xe3, 0x93, 0xcd, 0xa5,
760     0x07, 0xbb, 0x8d, 0x34, 0x32, 0x6f, 0x10, 0xe5, 0xdb, 0x85, 0x42, 0x75, 0xe0, 0x01, 0x8d, 0xdd, 0x30, 0x0a, 0x06, 0x08, 0x2a,
761     0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0x98, 0x2f, 0xd0, 0x38, 0xcc, 0xfc,
762     0x7b, 0x51, 0x92, 0x03, 0xf3, 0x08, 0x28, 0xa0, 0x03, 0xd8, 0x80, 0x55, 0x98, 0x25, 0xe5, 0x1d, 0x45, 0xd6, 0x05, 0xc2, 0xe5,
763     0xb6, 0x09, 0xad, 0x58, 0xb2, 0x02, 0x21, 0x00, 0xfc, 0x41, 0x54, 0xb2, 0xd6, 0x66, 0x75, 0x08, 0xc7, 0x0f, 0x21, 0x30, 0xb3,
764     0xee, 0xaa, 0x49, 0xc8, 0x7b, 0x71, 0xd8, 0x99, 0x71, 0x69, 0x36, 0xbb, 0x47, 0x66, 0x9e, 0xed, 0x86, 0x6b, 0x83,
765 };
766
767 extern const uint32_t sTestCert_FirmwareSigning_DER_Len = sizeof(sTestCert_FirmwareSigning_DER);
768
769 extern const uint8_t sTestCert_FirmwareSigning_PublicKey[] = {
770     0x04, 0xc3, 0xc4, 0x61, 0x40, 0x51, 0x3f, 0x6a, 0xa5, 0x95, 0x54, 0x33, 0xa4, 0xf0, 0x89, 0x42, 0x2e,
771     0xfc, 0x72, 0xae, 0xc5, 0x21, 0x08, 0x94, 0x42, 0x9c, 0xf5, 0x4d, 0xd3, 0x31, 0x2a, 0x82, 0x55, 0x46,
772     0x42, 0x2c, 0xcc, 0x29, 0xb9, 0x8e, 0xcc, 0x8b, 0xdd, 0x34, 0x38, 0xa8, 0x3f, 0xa7, 0x3f, 0xac, 0xc7,
773     0xff, 0xbd, 0xa7, 0x25, 0x40, 0x6e, 0xab, 0xf8, 0x4e, 0x20, 0xec, 0x27, 0x47, 0x60,
774 };
775
776 extern const uint8_t sTestCert_FirmwareSigning_PublicKey_Len = sizeof(sTestCert_FirmwareSigning_PublicKey);
777
778 extern const uint8_t sTestCert_FirmwareSigning_PrivateKey[] = {
779     0x32, 0x73, 0x5a, 0xd7, 0x36, 0x33, 0x7c, 0x10, 0xb8, 0xd3, 0x65, 0x47, 0xdc, 0xda, 0x37, 0xba,
780     0xa7, 0xfe, 0x37, 0xf2, 0xa9, 0xb1, 0x7d, 0x47, 0x55, 0xed, 0x73, 0x1d, 0xf7, 0x33, 0x51, 0x74,
781 };
782
783 extern const uint8_t sTestCert_FirmwareSigning_PrivateKey_Len = sizeof(sTestCert_FirmwareSigning_PrivateKey);
784
785 extern const uint8_t sTestCert_FirmwareSigning_SubjectKeyId[] = {
786     0xC7, 0x93, 0x14, 0x3D, 0xD2, 0x86, 0x46, 0x41, 0xF2, 0xB9, 0x6D, 0x84, 0x17, 0xA9, 0x98, 0x19, 0x37, 0x48, 0x8A, 0x07,
787 };
788
789 extern const uint8_t sTestCert_FirmwareSigning_SubjectKeyId_Len = sizeof(sTestCert_FirmwareSigning_SubjectKeyId);
790
791 extern const uint64_t sTestCert_FirmwareSigning_Id = 0xFFFFFFFF00000001ULL;
792
793 } // namespace TestCerts
794 } // namespace chip