File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 3030 - source-path: ./
3131 - name: Arduino_DebugUtils
3232 - source-url: https://github.com/fabik111/Arduino_ConnectionHandler.git
33- version: 54b93d64da130f653fb437819c22fb89b78732d0
33+ version: 4f3731efa31f4889095e6191d212a98a3cc21a70
3434 - source-url: https://github.com/arduino-libraries/ArduinoBLE.git
3535 - source-url: https://github.com/arduino-libraries/Arduino_CloudUtils.git
3636 - source-url: https://github.com/arduino-libraries/Arduino_KVStore.git
Original file line number Diff line number Diff line change 225225 }
226226 }
227227
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+
228244 WHEN (" Encode a message with provisioning ble mac Address " )
229245 {
230246 BLEMacAddressProvisioningMessage command;
327343 // 81 # array(1)
328344 // 65 # text(5)
329345 // 312E362E30 # "1.6.0"
330- printf (" res %d\n " , (int )err);
331346 THEN (" The encoding is successful" ) {
332347 REQUIRE (err == MessageEncoder::Status::Complete);
333348 REQUIRE (bytes_encoded == sizeof (expected_result));
You can’t perform that action at this time.
0 commit comments