Skip to content

Commit

Permalink
[review] ta: pkcs11: add CKM_RSA_X_509 authentication
Browse files Browse the repository at this point in the history
Add CFG_PKCS11_TA_RSA_X_509 to allow configuring the pkcs11 TA
without raw RSA crypto support.

Signed-off-by: Etienne Carriere <[email protected]>
  • Loading branch information
etienne-lms committed Nov 20, 2024
1 parent 59f83a1 commit 5809b19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ta/pkcs11/src/token_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ const struct pkcs11_mechachism_modes token_mechanism[] = {
TA_MECHANISM(PKCS11_CKM_RSA_PKCS_KEY_PAIR_GEN,
PKCS11_CKFM_GENERATE_KEY_PAIR),
TA_MECHANISM(PKCS11_CKM_RSA_PKCS, CKFM_CIPHER | CKFM_AUTH_NO_RECOVER),
#ifdef CFG_PKCS11_TA_RSA_X_509
TA_MECHANISM(PKCS11_CKM_RSA_X_509, CKFM_CIPHER | CKFM_AUTH_NO_RECOVER),
#endif
TA_MECHANISM(PKCS11_CKM_RSA_PKCS_PSS, CKFM_AUTH_NO_RECOVER),
TA_MECHANISM(PKCS11_CKM_MD5_RSA_PKCS, CKFM_AUTH_NO_RECOVER),
TA_MECHANISM(PKCS11_CKM_SHA1_RSA_PKCS, CKFM_AUTH_NO_RECOVER),
Expand Down
5 changes: 5 additions & 0 deletions ta/pkcs11/sub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ CFG_PKCS11_TA_TOKEN_COUNT ?= 3
# When enabled, embed support for object checksum value computation
CFG_PKCS11_TA_CHECK_VALUE_ATTRIBUTE ?= y

# When enabled, embed support for CKM_RSA_X_509 (a.k.a. Raw RSA) ciphering
# and authentication. The feature can be needed for some TLS v1.2 connections.
# Raw RSA can be unsafe if client uses a weak clear data padding scheme.
CFG_PKCS11_TA_RSA_X_509 ?= y

global-incdirs-y += include
global-incdirs-y += src
subdirs-y += src

0 comments on commit 5809b19

Please sign in to comment.