| 1d3ebedb | 17-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: command to get mechanism info
Implement command PKCS11_CMD_MECHANISM_INFO for client to get information on a specific mechanism embedded in a token.
Signed-off-by: Etienne Carriere <eti
ta: pkcs11: command to get mechanism info
Implement command PKCS11_CMD_MECHANISM_INFO for client to get information on a specific mechanism embedded in a token.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6f74919d | 04-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: command to get mechanisms embedded in a token
Implement command PKCS11_CMD_MECHANISM_IDS for client to get IDs of the mechanisms embedded in a token
Signed-off-by: Etienne Carriere <eti
ta: pkcs11: command to get mechanisms embedded in a token
Implement command PKCS11_CMD_MECHANISM_IDS for client to get IDs of the mechanisms embedded in a token
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8849c126 | 18-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: support for mechanism embedded in a token
Implement token_capabilities.c to centralize the mechanisms supported by a token. As PKCS11 TA can implemented several token, each token may pro
ta: pkcs11: support for mechanism embedded in a token
Implement token_capabilities.c to centralize the mechanisms supported by a token. As PKCS11 TA can implemented several token, each token may provide support for a restricted list of mechanisms and processing over these mechanisms.
Array pkcs11_modes[] is used to strictly define the processing that are allowed for a mechanism as per PKCS#11 specification.
Conversion of a mechanism ID into a debug friendly string is implemented in token_capabilities.c rather than pkcs11_helpers.c as for the other string helpers since the source file already defines the list of the valid mechanism IDs, hence an indirection from id2str_mechanism() to mechanism_string_id().
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9dbdd8cd | 18-Mar-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: identify user as per define user types
Define users with CKU User Type in Cryptoki API: PKCS11_CKU_SO and PKCS11_CKU_USER. They will be used as identifiers for login and related PKCS#11
ta: pkcs11: identify user as per define user types
Define users with CKU User Type in Cryptoki API: PKCS11_CKU_SO and PKCS11_CKU_USER. They will be used as identifiers for login and related PKCS#11 API functions.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
show more ...
|
| 030e7392 | 04-Mar-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: implement command to get token information
Implement TA command PKCS11_CMD_TOKEN_INFO for client to get information on a token embedded in the PKCS11 TA.
Rename PKCS11_TOKEN_PIN_SIZE in
ta: pkcs11: implement command to get token information
Implement TA command PKCS11_CMD_TOKEN_INFO for client to get information on a token embedded in the PKCS11 TA.
Rename PKCS11_TOKEN_PIN_SIZE into PKCS11_TOKEN_PIN_SIZE_MAX as introducing PKCS11_TOKEN_PIN_SIZE_MIN, in pkcs11_token.h.
Rely on serializer.h for de-serializing the command arguments.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
show more ...
|
| b3ac5035 | 17-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: add pad_str() helper in token info wrapper
Add pad_str() to pad a string ('\0' terminated) with blank characters (' '), removing the '\0' termination as per PKCS#11 specification.
This
ta: pkcs11: add pad_str() helper in token info wrapper
Add pad_str() to pad a string ('\0' terminated) with blank characters (' '), removing the '\0' termination as per PKCS#11 specification.
This will factorize other padding needed in other function/command wrappers.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
show more ...
|
| ce94efef | 17-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: implement command to get slot information
Implement TA command PKCS11_CMD_SLOT_INFO for client get information on a specific slot.
Rely on serializer.h for de-serializing the command ar
ta: pkcs11: implement command to get slot information
Implement TA command PKCS11_CMD_SLOT_INFO for client get information on a specific slot.
Rely on serializer.h for de-serializing the command arguments.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d38f9635 | 02-Mar-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: speculation safe lookup of token instance
Change get_token_id() to be safe against speculation execution for IDs provided by client. This change is needed for TA command handlers relying
ta: pkcs11: speculation safe lookup of token instance
Change get_token_id() to be safe against speculation execution for IDs provided by client. This change is needed for TA command handlers relying on slot/token IDs provided by client applications.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 22ac6984 | 04-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: implement command to get slots list
Implement TA command PKCS11_CMD_SLOT_LIST for client to get the IDs of the slots embedded in the PKCS11 TA.
Signed-off-by: Etienne Carriere <etienne.
ta: pkcs11: implement command to get slots list
Implement TA command PKCS11_CMD_SLOT_LIST for client to get the IDs of the slots embedded in the PKCS11 TA.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4f8a354f | 04-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: de-serialization of command arguments
Add serialize.c|.h that provide functions to extract a sized data in a serialized buffer as used for command serial arguments.
Signed-off-by: Etien
ta: pkcs11: de-serialization of command arguments
Add serialize.c|.h that provide functions to extract a sized data in a serialized buffer as used for command serial arguments.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a67dc424 | 04-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: API for slot/token information
Define invocation commands to carry the request related to PKCS#11 API functions related to slot and token information: - get the list of the slots, relate
ta: pkcs11: API for slot/token information
Define invocation commands to carry the request related to PKCS#11 API functions related to slot and token information: - get the list of the slots, related to CK function C_GetSlotList(), - get information from a slot, related to C_GetSlotInfo(), - get information from a token, related to C_GetTokenInfo(), - get the list of mechanisms supported by a token, C_GetMechanismList(), - get information a mechanism from a token, C_GetMechanismInfo().
The TA API involves several byte serialization of invocation parameters data inside TEE invocation input/output memory reference parameters.
This change introduces the command APIs and some debug helpers for the newly defined slot/token flags.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 208dec38 | 20-Jan-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: report PKCS11 return code to client
For the PKCS11 TA to provide client a meaningful return code as per PKCS#11 specification, the GPD TEE command invocation return code is forced to TEE
ta: pkcs11: report PKCS11 return code to client
For the PKCS11 TA to provide client a meaningful return code as per PKCS#11 specification, the GPD TEE command invocation return code is forced to TEE_SUCCESS and client is expected to read effective PKCS11 return code (which can report a success or a failure) from invocation parameter #0 that must be a input/output memory reference. The status is return as a 32bit value in the output buffer.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 60290f69 | 04-Feb-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: add debug trace at command entry/exit
Add debug traces at entry and exit of the command invocation handler of the TA. Prints TA command as a readable string thanks to ck_helpers.c
Signe
ta: pkcs11: add debug trace at command entry/exit
Add debug traces at entry and exit of the command invocation handler of the TA. Prints TA command as a readable string thanks to ck_helpers.c
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6ea5aa6c | 20-Jan-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: invocation command PKCS11
Introduce a first invocation command for the TA: PKCS11_CMD_PING can be used the check TA presence and possibly retrieve TA version information if client provid
ta: pkcs11: invocation command PKCS11
Introduce a first invocation command for the TA: PKCS11_CMD_PING can be used the check TA presence and possibly retrieve TA version information if client provides an output buffer.
Add helpers to trace command and parameters configuration.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Markus S. Wamser <markus.wamser@mixed-mode.de> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|