Fix optional parameter handling in crypto service
The psa_crypto api mandates that the optional 'salt' parameter passed
to psa_asymmetric_encrypt/decrypt should be NULL if there is no
salt. This fix modifies packed-c encoding to omit the salt TLV
if not needed. Deserialization logic is also made more tolerant
to a missing or zero length salt parameter. A new test case
is added to cover an asymmetric encrypt/decrypt with a salt.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I08d23ea11a8e75bd880367dcb380805ce921033f
7 files changed