Add to get passphrase string from config
[platform/core/connectivity/net-config.git] / src / wifi-key-encryption.c
index e8a9f36..03b5da3 100755 (executable)
@@ -127,9 +127,9 @@ static int __netconfig_generate_aes_key()
 
 static void*  __netconfig_set_param_list_aes_gcm(ckmc_param_list_h param)
 {
-       ckmc_raw_buffer_s *iv_buf;
+       ckmc_raw_buffer_s *iv_buf = NULL;
        unsigned char rnd[RND_LENGTH];
-       ckmc_raw_buffer_s *aad_buf;
+       ckmc_raw_buffer_s *aad_buf = NULL;
        unsigned char aad[RND_LENGTH];
 
        err = ckmc_get_data(IV_ALIAS, NULL, &iv_buf);
@@ -308,7 +308,7 @@ gboolean handle_encrypt_passphrase(Wifi *wifi, GDBusMethodInvocation *context, c
        if ((wifi == NULL) || (passphrase == NULL)) {
                ERR("Invalid parameter");
                netconfig_error_invalid_parameter(context);
-               return FALSE;
+               return TRUE;
        }
 
        enc_data = _netconfig_encrypt_passphrase(passphrase);