From: Jaehyun Kim Date: Tue, 24 Sep 2024 03:35:32 +0000 (+0900) Subject: Check if ckmc_get_data() provides NULL value X-Git-Tag: accepted/tizen/7.0/unified/20240925.162126~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce4c08a3001b1cf030d11dee0a6e24a4e60efb85;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Check if ckmc_get_data() provides NULL value There are cases where ckmc_get_data() provides NULL value due to a DB issue used by key-manager. This causes passphrase decryption to fail and causes wifi connection failure. Code has been added to check for this situation. Change-Id: Ic79efcc26efa33251771bf7757ddda5ef600f895 Signed-off-by: Jaehyun Kim --- diff --git a/src/wifi-key-encryption.c b/src/wifi-key-encryption.c index 33c8f5a..6268cb4 100755 --- a/src/wifi-key-encryption.c +++ b/src/wifi-key-encryption.c @@ -127,6 +127,11 @@ static void* __netconfig_set_param_list_aes_gcm(ckmc_param_list_h param) err = ckmc_get_data(IV_ALIAS, NULL, &iv_buf); + if (iv_buf == NULL) { + DBG("iv_buf is null"); + return NULL; + } + if (err == CKMC_ERROR_DB_ALIAS_UNKNOWN) { ckmc_policy_s policy; policy.extractable = true;