File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 30
30
- source-path: ./
31
31
- name: Arduino_DebugUtils
32
32
- source-url: https://github.com/fabik111/Arduino_ConnectionHandler.git
33
- version: 54b93d64da130f653fb437819c22fb89b78732d0
33
+ version: 4f3731efa31f4889095e6191d212a98a3cc21a70
34
34
- source-url: https://github.com/arduino-libraries/ArduinoBLE.git
35
35
- source-url: https://github.com/arduino-libraries/Arduino_CloudUtils.git
36
36
- source-url: https://github.com/arduino-libraries/Arduino_KVStore.git
Original file line number Diff line number Diff line change 225
225
}
226
226
}
227
227
228
+ WHEN (" Encode a message with provisioning public key" )
229
+ {
230
+ ProvPublicKeyProvisioningMessage command;
231
+ command.c .id = ProvisioningMessageId::ProvPublicKeyProvisioningMessageId;
232
+ command.provPublicKey = " -----BEGIN PUBLIC KEY-----\n MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7JxCtXl5SvIrHmiasqyN4pyoXRlm44d5WXNpqmvJ\n k0tH8UpmIeHG7YPAkKLaqid95v/wLVoWeX5EbjxmlCkFtw==\n -----END PUBLIC KEY-----\n " ;
233
+ uint8_t buffer[50 ];
234
+ size_t bytes_encoded = sizeof (buffer);
235
+
236
+ CBORMessageEncoder encoder;
237
+ MessageEncoder::Status err = encoder.encode ((Message*)&command, buffer, bytes_encoded);
238
+
239
+ THEN (" The encoding is failing" ) {
240
+ REQUIRE (err == MessageEncoder::Status::Error);
241
+ }
242
+ }
243
+
228
244
WHEN (" Encode a message with provisioning ble mac Address " )
229
245
{
230
246
BLEMacAddressProvisioningMessage command;
327
343
// 81 # array(1)
328
344
// 65 # text(5)
329
345
// 312E362E30 # "1.6.0"
330
- printf (" res %d\n " , (int )err);
331
346
THEN (" The encoding is successful" ) {
332
347
REQUIRE (err == MessageEncoder::Status::Complete);
333
348
REQUIRE (bytes_encoded == sizeof (expected_result));
You can’t perform that action at this time.
0 commit comments