Correct handling of missing salt protobuf parameter

Asymmetric encrypt/decrypt operations take an optional salt
parameter. With the PB serialization, omitting optional
parameters is a legitimate way to tell the service provider
to assume a default. This wasn't handled correctly in
pb_crypto_provider_serializer.c. This change modifies
the behaviour of the cpp crypto client to omit the salt
parameter rather than explicitly encoding a zero length
salt. With the existing asymmetric encrypt/decrypt
service tests, operations with and without a salt
are already covered. With the change to the cpp client,
the invalid handling within the pb deserializer lead to
the expected test failure. A fix is implemented in
pb_crypto_provider_serilaizer.c that resolves the failure.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I3ef89d992092009abf4d1cff5e6e9e032e23a2bc
2 files changed