Skip to content

Commit fff80bb

Browse files
fengming-yejukkar
authored andcommitted
zephyr: crypto: fix DPP3 build error
Fix DPP3 build error for latest upmerge. Add empty api hpke_base_seal and hpke_base_open, which will be called by wpas_dpp_rx_priv_peer_intro_notify, only when ssid_field option dpp_connector_privacy is enabled. But in zephyr case we won't provide visible way of enablding it to user. But DPP3 carries other fixes except this function. So this empty api is okay and can fix build error when DPP3 enabled. Porting from original file to fix missing api build error, https://github.com/gstrauss/hostap/blob/mbedtls/src/crypto/crypto_mbedtls.c. Signed-off-by: Fengming Ye <[email protected]>
1 parent f72b2d4 commit fff80bb

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/crypto/crypto_mbedtls_alt.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@
138138
#define CRYPTO_MBEDTLS_CRYPTO_PKCS7
139139
#endif /* crypto_pkcs7_*() */
140140

141+
#if defined(CONFIG_DPP3) /* CONFIG_DPP3=y */
142+
#define CRYPTO_MBEDTLS_CRYPTO_HPKE
143+
#endif
144+
141145
#if defined(EAP_SIM) || defined(EAP_SIM_DYNAMIC) || defined(EAP_SERVER_SIM) || defined(EAP_AKA) || \
142146
defined(EAP_AKA_DYNAMIC) || defined(EAP_SERVER_AKA) || defined(CONFIG_AP) || defined(HOSTAPD)
143147
/* CONFIG_EAP_SIM=y CONFIG_EAP_AKA=y CONFIG_AP=y HOSTAPD */
@@ -3229,4 +3233,37 @@ struct wpabuf *crypto_pkcs7_get_certificates(const struct wpabuf *pkcs7)
32293233
}
32303234
#endif /* CRYPTO_MBEDTLS_CRYPTO_PKCS7 */
32313235

3236+
#ifdef CRYPTO_MBEDTLS_CRYPTO_HPKE
3237+
3238+
struct wpabuf *hpke_base_seal(enum hpke_kem_id kem_id,
3239+
enum hpke_kdf_id kdf_id,
3240+
enum hpke_aead_id aead_id,
3241+
struct crypto_ec_key *peer_pub,
3242+
const u8 *info,
3243+
size_t info_len,
3244+
const u8 *aad,
3245+
size_t aad_len,
3246+
const u8 *pt,
3247+
size_t pt_len)
3248+
{
3249+
/* not yet implemented */
3250+
return NULL;
3251+
}
3252+
3253+
struct wpabuf *hpke_base_open(enum hpke_kem_id kem_id,
3254+
enum hpke_kdf_id kdf_id,
3255+
enum hpke_aead_id aead_id,
3256+
struct crypto_ec_key *own_priv,
3257+
const u8 *info,
3258+
size_t info_len,
3259+
const u8 *aad,
3260+
size_t aad_len,
3261+
const u8 *enc_ct,
3262+
size_t enc_ct_len)
3263+
{
3264+
/* not yet implemented */
3265+
return NULL;
3266+
}
3267+
#endif
3268+
32323269
#endif

0 commit comments

Comments
 (0)