Handle valid case for hash_size==0 72/163272/1
authorJaroslaw Pelczar <j.pelczar@samsung.com>
Tue, 5 Dec 2017 05:32:09 +0000 (06:32 +0100)
committerJaroslaw Pelczar <j.pelczar@samsung.com>
Tue, 5 Dec 2017 05:32:09 +0000 (06:32 +0100)
commit5ced502eef6f0e7b6c97475629d352f605d62413
treed2e4f882e1aa904a083538086f7958e0c8bb9ff0
parenta1201c8f831ae2a838cf77c5a4c1d28e62eaddf2
Handle valid case for hash_size==0

If hash size is 0 then MD algorithm must not be NONE, in this
case hash_size is extracted from expected length for MD algorithm.
If MD algorithm is not NONE, then hash_size is validated against
the algorithm's expected input length.

Change-Id: Ib95d8138ce6a21c364a5d7f88910fde15e32a026
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
dcm-client/dcmclient.cpp
dcm-daemon/dcmsession.cpp