Currently the decoder fails if ZCBOR_CANONICAL is defined and it receives
non-canonical data. Instead, add a bool to the constant state to decide
whether to enforce. ZCBOR_CANONICAL decides the default value for the bool.
Also fix various things related to constant_state
Gracefully handle constant_state being missing.
Always use ZCBOR_ERR_INVALID_VALUE_ENCODING for non-canonical data.
Currently the decoder fails if ZCBOR_CANONICAL is defined and it receives non-canonical data. Instead, add a bool to the constant state to decide whether to enforce. ZCBOR_CANONICAL decides the default value for the bool.
Also fix various things related to constant_state
Gracefully handle constant_state being missing. Always use ZCBOR_ERR_INVALID_VALUE_ENCODING for non-canonical data.