Implement public key extraction in TZ backend 97/294897/3
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 28 Jun 2023 08:21:21 +0000 (10:21 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 29 Jun 2023 08:30:18 +0000 (08:30 +0000)
commit127f0a0e5983dbf2642e0badcb1a3aab3e450079
tree9cbb2e2c764f71bcd689f501781a641650c81fc2
parent5b48826f33df8236f8aa37dda4c055b662adafc2
Implement public key extraction in TZ backend

Public keys are not secrets and there are scenarios like ECDH when they
have to be extracted in raw form. Exportability logic still applies.

* Separate the object id and the raw data in TZ backend objects.
* Rename function arguments to make their meaning more adequate.
* Use object id when making operations using given key or binary data.
* Return raw data only to CKMLogic via getBinary() method.
* Make getBinary() return an empty buffer for private and symmetric keys.
* Move m_type to AKey where it's used.

Change-Id: Idf6db51387d98f6560f0da18e2fc1d9bbc3abc4f
src/manager/crypto/tz-backend/internals.cpp
src/manager/crypto/tz-backend/internals.h
src/manager/crypto/tz-backend/obj.cpp
src/manager/crypto/tz-backend/obj.h
src/manager/crypto/tz-backend/store.cpp
src/manager/crypto/tz-backend/tz-context.cpp
src/manager/crypto/tz-backend/tz-context.h