Skip to content

Commit

Permalink
Changed encoding to Base64URL (no padding)
Browse files Browse the repository at this point in the history
Fix - Changed encoding from Base64 (with padding) to Base64URL (no paddi
ng) for data value 'vd' over SenML JSON format.

According to the SenML JSON specification defined at RFC8428§4.3 the
Base64 URL safe alphabet must be used (without padding) for Data Value
'vd':

"(*) Data Value is a base64-encoded string with the URL-safe alphabet as
defined in Section 5 of [RFC4648], with padding omitted. (In CBOR, the
octets in the Data Value are encoded using a definite-length byte
string, major type 2.)"

So, encoding and decoding has been changed from Base64 (with padding) to
Base64Url (without padding) for data value 'vd' over SenML JSON format.

Note that the behavior of the code in data/json.c has not changed, data
in JSON format will continue to be encoded in Base64 (with padding), see
eclipse-leshan/leshan#1444 (comment)

New tests has been added in order to test the Base64Url (without
padding) encode and decode functions, and the previous tests have been
modified by adding a new entry to be tested.

Fix: eclipse-wakaama#698
also see:
github.com/OpenMobileAlliance/OMA_LwM2M_for_Developers/issues/553
  • Loading branch information
parmi93 committed Jun 16, 2023
1 parent d845b74 commit af8f2f4
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit af8f2f4

Please sign in to comment.