[pan2/merge_testing_master: 18/20] added ability to import from SSL_CERT_DIR (has to be exported)
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2/merge_testing_master: 18/20] added ability to import from SSL_CERT_DIR (has to be exported)
- Date: Fri, 23 Dec 2011 16:50:39 +0000 (UTC)
commit 4c6414745da836bf3187396b1a3af5742941e742
Author: Heinrich MÃller <henmull src gnome org>
Date: Fri Dec 23 16:43:47 2011 +0100
added ability to import from SSL_CERT_DIR (has to be exported)
pan/data/cert-store.cc | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/pan/data/cert-store.cc b/pan/data/cert-store.cc
index 1d9da03..3c92d5a 100644
--- a/pan/data/cert-store.cc
+++ b/pan/data/cert-store.cc
@@ -212,13 +212,15 @@ namespace pan
}
// get certs from ssl certs directory
-#ifdef SSL_DIR
GError* err(NULL);
- const char * ssldir = SSL_DIR;
+
+ const char * ssldir = getenv("SSL_CERT_DIR");
+ if (!ssldir) ssldir = getenv("SSL_DIR");
+
GDir * dir = g_dir_open (ssldir, 0, &err);
if (err != NULL)
{
- Log::add_err_va (_("Error opening SSL certificate directory: \"%s\": %s"), _path.c_str(), err->message);
+ Log::add_err_va (_("Error opening SSL certificate directory: \"%s\": %s"), ssldir, err->message);
g_error_free (err);
}
else
@@ -239,7 +241,7 @@ namespace pan
}
g_dir_close (dir);
}
-#endif
+
return cnt;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]