File tree Expand file tree Collapse file tree 11 files changed +43
-25
lines changed Expand file tree Collapse file tree 11 files changed +43
-25
lines changed Original file line number Diff line number Diff line change @@ -158,8 +158,7 @@ config BT_SILABS_EFR32
158158	depends on ZEPHYR_HAL_SILABS_MODULE_BLOBS || BUILD_ONLY_NO_BLOBS
159159	depends on !PM || SOC_GECKO_PM_BACKEND_PMGR
160160	select SOC_GECKO_USE_RAIL
161- 	select MBEDTLS
162- 	select MBEDTLS_PSA_CRYPTO_C
161+ 	select PSA_CRYPTO
163162	select HAS_BT_CTLR
164163	select BT_CTLR_PHY_UPDATE_SUPPORT
165164	select BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ endchoice
204204
205205config WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA
206206	bool "Crypto Platform Secure Architecture support for WiFi"
207- 	imply MBEDTLS_PSA_CRYPTO_C 
207+ 	select PSA_CRYPTO 
208208	select MBEDTLS_USE_PSA_CRYPTO
209209	select PSA_WANT_ALG_ECDH
210210	select PSA_WANT_ALG_HMAC
Original file line number Diff line number Diff line change 11# Copyright (c) 2024 BayLibre SAS
22# SPDX-License-Identifier: Apache-2.0
33
4- # This file extends Kconfig.psa (which is automatically generated) by adding
5- # some logic between PSA_WANT symbols.
4+ config PSA_CRYPTO
5+ 	bool "PSA Crypto API"
6+ 	help
7+ 	  Enable a PSA Crypto API provider in the build. If TF-M is enabled then
8+ 	  it will be used for this scope, otherwise Mbed TLS will be used.
9+ 	  PSA_CRYPTO_PROVIDER_CUSTOM can be selected to use an out-of-tree
10+ 	  implementation.
11+ 
12+ choice PSA_CRYPTO_PROVIDER
13+ 	prompt "PSA Crypto API provider"
14+ 	depends on PSA_CRYPTO
15+ 
16+ config PSA_CRYPTO_PROVIDER_TFM
17+ 	bool "Use TF-M"
18+ 	depends on BUILD_WITH_TFM
19+ 	select TFM_PARTITION_CRYPTO
20+ 
21+ config PSA_CRYPTO_PROVIDER_MBEDTLS
22+ 	bool "Use Mbed TLS"
23+ 	depends on !BUILD_WITH_TFM
24+ 	select MBEDTLS
25+ 	select MBEDTLS_PSA_CRYPTO_C
26+ 
27+ config PSA_CRYPTO_PROVIDER_CUSTOM
28+ 	bool "Use an out-of-tree library"
29+ 	depends on !BUILD_WITH_TFM
30+ 
31+ endchoice # PSA_CRYPTO_PROVIDER
32+ 
33+ # The following section extends Kconfig.psa.auto (which is automatically
34+ # generated) by adding some logic between PSA_WANT symbols.
635
736config PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC
837	bool
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ menuconfig UOSCORE
55	bool "UOSCORE library"
66	depends on ZCBOR
77	depends on ZCBOR_CANONICAL
8- 	depends on MBEDTLS
98	select UOSCORE_UEDHOC_CRYPTO_COMMON
109
1110	help
@@ -22,7 +21,6 @@ menuconfig UEDHOC
2221	bool "UEDHOC library"
2322	depends on ZCBOR
2423	depends on ZCBOR_CANONICAL
25- 	depends on MBEDTLS
2624	select UOSCORE_UEDHOC_CRYPTO_COMMON
2725	help
2826	  This option enables the UEDHOC library.
@@ -38,7 +36,7 @@ if UOSCORE || UEDHOC
3836
3937config UOSCORE_UEDHOC_CRYPTO_COMMON
4038	bool
41- 	imply MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM 
39+ 	select PSA_CRYPTO 
4240	select PSA_WANT_ALG_ECDH
4341	select PSA_WANT_ALG_ECDSA
4442	select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ config NET_SAMPLE_HTTP_SERVER_SERVICE_PORT
1717config NET_SAMPLE_HTTPS_SERVICE
1818	bool "Enable https service"
1919	depends on NET_SOCKETS_SOCKOPT_TLS || TLS_CREDENTIALS
20- 	imply MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM 
20+ 	select PSA_CRYPTO 
2121
2222if NET_SAMPLE_HTTPS_SERVICE
2323
Original file line number Diff line number Diff line change 11CONFIG_FLASH_AREA_CHECK_INTEGRITY_PSA=y
2- CONFIG_MBEDTLS=y
3- CONFIG_MBEDTLS_PSA_CRYPTO_C=y
2+ CONFIG_PSA_CRYPTO=y
Original file line number Diff line number Diff line change 33
44config BT_CRYPTO
55	bool
6- 	select MBEDTLS if !BUILD_WITH_TFM
7- 	select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
6+ 	select PSA_CRYPTO
87	select PSA_WANT_KEY_TYPE_AES
98	select PSA_WANT_ALG_CMAC
109	select PSA_WANT_ALG_ECB_NO_PADDING
Original file line number Diff line number Diff line change @@ -200,8 +200,7 @@ config BT_BUF_EVT_DISCARDABLE_COUNT
200200config BT_HOST_CRYPTO
201201	bool "Use crypto functionality implemented in the Bluetooth host"
202202	default y if !BT_CTLR_CRYPTO
203- 	select MBEDTLS if !BUILD_WITH_TFM
204- 	select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
203+ 	select PSA_CRYPTO
205204	select PSA_WANT_KEY_TYPE_AES
206205	select PSA_WANT_ALG_ECB_NO_PADDING
207206	help
@@ -1041,8 +1040,7 @@ endif # BT_DF
10411040
10421041config BT_ECC
10431042	bool
1044- 	select MBEDTLS if !BUILD_WITH_TFM
1045- 	select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
1043+ 	select PSA_CRYPTO
10461044	select PSA_WANT_ALG_ECDH
10471045	select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE
10481046	select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
Original file line number Diff line number Diff line change @@ -28,17 +28,15 @@ config JWT_SIGN_RSA_LEGACY
2828
2929config JWT_SIGN_RSA_PSA
3030	bool "Use RSA signature (RS-256). Use PSA Crypto API."
31- 	select MBEDTLS if !BUILD_WITH_TFM
32- 	select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
31+ 	select PSA_CRYPTO
3332	select PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY
3433	select PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT
3534	select PSA_WANT_ALG_RSA_PKCS1V15_SIGN
3635	select PSA_WANT_ALG_SHA_256
3736
3837config JWT_SIGN_ECDSA_PSA
3938	bool "Use ECDSA signature (ES-256). Use PSA Crypto API."
40- 	select MBEDTLS if !BUILD_WITH_TFM
41- 	select MBEDTLS_PSA_CRYPTO_C if !BUILD_WITH_TFM
39+ 	select PSA_CRYPTO
4240	select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
4341	select PSA_WANT_ALG_ECDSA
4442	select PSA_WANT_ECC_SECP_R1_256
Original file line number Diff line number Diff line change 1- CONFIG_MBEDTLS=y
2- CONFIG_MBEDTLS_PSA_CRYPTO_C=y
1+ CONFIG_PSA_CRYPTO=y
32CONFIG_PSA_CRYPTO_ENABLE_ALL=y
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments