@@ -24,6 +24,8 @@ if(CONFIG_MBEDTLS_PSA_CRYPTO_C)
24
24
)
25
25
endif ()
26
26
27
+ if (COMPILE_PSA_APIS OR CONFIG_NRF_SECURITY_LEGACY_AND_PSA)
28
+
27
29
if (COMPILE_PSA_APIS)
28
30
list (APPEND src_crypto_oberon
29
31
${drivers_path} /oberon_helpers.c
@@ -55,6 +57,35 @@ if (COMPILE_PSA_APIS)
55
57
append_with_prefix_ifdef(CONFIG_PSA_NEED_OBERON_CTR_DRBG_DRIVER src_crypto_oberon ${drivers_path} oberon_ctr_drbg.c)
56
58
append_with_prefix_ifdef(CONFIG_PSA_NEED_OBERON_HMAC_DRBG_DRIVER src_crypto_oberon ${drivers_path} oberon_hmac_drbg.c)
57
59
60
+
61
+ elseif (CONFIG_NRF_SECURITY_LEGACY_AND_PSA)
62
+ # When legacy and PSA are enabled, we need to include all the oberon drivers
63
+ # since we don't have PSA_NEED_* symbols in Kconfig.
64
+ list (APPEND src_crypto_oberon
65
+ ${drivers_path} /oberon_helpers.c
66
+ ${drivers_path} /oberon_ecdh.c
67
+ ${drivers_path} /oberon_ecdsa.c
68
+ ${drivers_path} /oberon_ec_keys.c
69
+ ${drivers_path} /oberon_jpake.c
70
+ ${drivers_path} /oberon_spake2p.c
71
+ ${drivers_path} /oberon_srp.c
72
+ ${drivers_path} /oberon_rsa.c
73
+ ${drivers_path} /oberon_key_management.c
74
+ ${drivers_path} /oberon_aead.c
75
+ ${drivers_path} /oberon_key_derivation.c
76
+ ${drivers_path} /oberon_mac.c
77
+ ${drivers_path} /oberon_cipher.c
78
+ ${drivers_path} /oberon_hash.c
79
+ ${drivers_path} /oberon_key_agreement.c
80
+ ${drivers_path} /oberon_pake.c
81
+ ${drivers_path} /oberon_asymmetric_signature.c
82
+ ${drivers_path} /oberon_asymmetric_encrypt.c
83
+ ${drivers_path} /oberon_ctr_drbg.c
84
+ ${drivers_path} /oberon_hmac_drbg.c)
85
+
86
+
87
+ endif ()
88
+
58
89
target_sources (${mbedcrypto_target} PRIVATE ${src_crypto_oberon} )
59
90
60
91
# Turn off warnings that Oberon are systematically
@@ -66,4 +97,5 @@ if (COMPILE_PSA_APIS)
66
97
-Wno-uninitialized
67
98
-Wno-maybe-uninitialized
68
99
)
100
+
69
101
endif ()
0 commit comments