core: crypto: avoid undefined bit shifts by a negative amount (-1)
core: crypto: avoid undefined bit shifts by a negative amount (-1)

The GET_ATTRIBUTE() and SET_ATTRIBUTE() macros are replaced with static
functions that properly handle the case when the attribute is not found.

Fixes: Coverity CID:1378609 CID:1378610 CID:1378611 CID:1378612
Signed-off-by: Jerome Forissier <ced78d268b4c9a0a20a59a9feeebd2ad90da03d3@linaro.org>
Reviewed-by: Jens Wiklander <7706914404370d7502c27a0eff493dcf491feb51@linaro.org>

pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os