summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchleun.moon <chleun.moon@samsung.com>2017-09-11 10:15:47 +0900
committerchleun.moon <chleun.moon@samsung.com>2017-09-11 10:16:04 +0900
commit2b56dc50fe4454d6c6e9f3a9db8b12ee01126fd4 (patch)
treed9e980e7d6604f0e0387ef34aceef91de133593b
parent8a710a99ee657f58e1bd821ba38f9127d50d503d (diff)
downloadconnman-2b56dc50fe4454d6c6e9f3a9db8b12ee01126fd4.tar.gz
connman-2b56dc50fe4454d6c6e9f3a9db8b12ee01126fd4.tar.bz2
connman-2b56dc50fe4454d6c6e9f3a9db8b12ee01126fd4.zip
Change-Id: Ie3faef9d95d95cbcfbd222d92f25e6eae8e41581 Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
-rw-r--r--vpn/plugins/ipsec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vpn/plugins/ipsec.c b/vpn/plugins/ipsec.c
index 6862fbcc..7a2675e0 100644
--- a/vpn/plugins/ipsec.c
+++ b/vpn/plugins/ipsec.c
@@ -267,7 +267,7 @@ static int read_der_file(const char *path, X509 **cert)
}
*cert = d2i_X509_fp(fp, NULL);
- if (!fp) {
+ if (!(*cert)) {
connman_error("Failed to read der file");
err = -EINVAL;
}
@@ -295,7 +295,7 @@ static int read_pem_file(const char *path, X509 **cert)
}
*cert = PEM_read_X509(fp, cert, NULL, NULL);
- if (!fp) {
+ if (!(*cert)) {
connman_error("Failed to read pem file");
err = -EINVAL;
}