[Pkg-owncloud-commits] [owncloud-client] 18/84: Ensure OpenSSL config file is only read from app dir

Sandro Knauß hefee at moszumanska.debian.org
Fri Oct 21 22:51:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee pushed a commit to branch master
in repository owncloud-client.

commit 5a57e4a7a673d14ea94d93e47262d619dad8d50f
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Fri Aug 5 12:36:21 2016 +0200

    Ensure OpenSSL config file is only read from app dir
---
 src/cmd/cmd.cpp         | 6 ++++++
 src/gui/application.cpp | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp
index 9fe32aa..03c04be 100644
--- a/src/cmd/cmd.cpp
+++ b/src/cmd/cmd.cpp
@@ -272,6 +272,12 @@ void selectiveSyncFixup(OCC::SyncJournalDb *journal, const QStringList &newList)
 int main(int argc, char **argv) {
     QCoreApplication app(argc, argv);
 
+#ifdef Q_OS_WIN
+    // Ensure OpenSSL config file is only loaded from app directory
+    QString opensslConf = QCoreApplication::applicationDirPath()+QString("/openssl.cnf");
+    qputenv("OPENSSL_CONF", opensslConf.toLocal8Bit());
+#endif
+
     qsrand(QTime::currentTime().msec() * QCoreApplication::applicationPid());
 
     CmdOptions options;
diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index aaa2ca6..f372966 100644
--- a/src/gui/application.cpp
+++ b/src/gui/application.cpp
@@ -105,6 +105,12 @@ Application::Application(int &argc, char **argv) :
 {
     _startedAt.start();
 
+#ifdef Q_OS_WIN
+    // Ensure OpenSSL config file is only loaded from app directory
+    QString opensslConf = QCoreApplication::applicationDirPath()+QString("/openssl.cnf");
+    qputenv("OPENSSL_CONF", opensslConf.toLocal8Bit());
+#endif
+
 // TODO: Can't set this without breaking current config paths
 //    setOrganizationName(QLatin1String(APPLICATION_VENDOR));
     setOrganizationDomain(QLatin1String(APPLICATION_REV_DOMAIN));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list