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 <jeik01.kim@samsung.com>
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;