summaryrefslogtreecommitdiff
path: root/vpn
diff options
context:
space:
mode:
authorchleun.moon <chleun.moon@samsung.com>2017-05-10 06:00:54 (GMT)
committerchleun.moon <chleun.moon@samsung.com>2017-05-10 06:01:00 (GMT)
commit6eaf073f23ab4b4c53e19c92aa38c10744a249a0 (patch)
tree9b5efae924718f0afe8132ee26c327a35baa25d2 /vpn
parent651d67b2c2cb5f51738cbdbc25409299e139c0f1 (diff)
downloadconnman-6eaf073f23ab4b4c53e19c92aa38c10744a249a0.zip
connman-6eaf073f23ab4b4c53e19c92aa38c10744a249a0.tar.gz
connman-6eaf073f23ab4b4c53e19c92aa38c10744a249a0.tar.bz2
Change-Id: Ie8f4fe3e11c71111249f07d3a4bcdf4b3737d671 Signed-off-by: cheoleun <chleun.moon@samsung.com>
Diffstat (limited to 'vpn')
-rw-r--r--vpn/plugins/ipsec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vpn/plugins/ipsec.c b/vpn/plugins/ipsec.c
index cd8b625..0901889 100644
--- a/vpn/plugins/ipsec.c
+++ b/vpn/plugins/ipsec.c
@@ -271,6 +271,10 @@ static void read_pkcs12_file(const char *path, const char *pass, EVP_PKEY **pkey
DBG("pkcs12 path %s\n", path);
fp = fopen(path, "r");
+ if (!fp) {
+ print_openssl_error();
+ return;
+ }
p12 = d2i_PKCS12_fp(fp, NULL);
if (!p12) {
@@ -524,6 +528,7 @@ static void ipsec_add_default_child_sa_data(struct vpn_provider *provider, VICIS
for (list = NULL; ikev1_esp_proposals[i] != NULL; i++)
list = g_slist_append(list, g_strdup(ikev1_esp_proposals[i]));
vici_add_list(child, "esp_proposals", list, "net");
+ g_slist_free_full(list, g_free);
list = NULL;
} else {
vici_add_kvl(child, "esp_proposals", ikev2_esp_proposals, "net");
@@ -541,11 +546,11 @@ static void ipsec_add_default_conn_data(struct vpn_provider *provider, VICISecti
for (list = NULL; ikev1_proposals[i] != NULL; i++)
list = g_slist_append(list, g_strdup(ikev1_proposals[i]));
vici_add_list(conn, "proposals", list, NULL);
+ g_slist_free_full(list, g_free);
list = NULL;
if (g_strcmp0(vpn_provider_get_string(provider, "IPsec.LocalAuth"), "psk") == 0)
vici_add_kv(conn, "aggressive", "yes", NULL);
-
} else {
vici_add_kvl(conn, "proposals", ikev2_proposals, NULL);
}