summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-09 10:59:33 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-09 10:59:33 +0100
commit7bbcb5240103b4ab19a7b35cd888dd25cf56aad1 (patch)
treed4bc99a86773ed49ec38d38029f360c1dcddc1f8 /src/lib
parentabf7799a1997c6519c04e6488f39553d92c5df16 (diff)
Try to fix openssl use on Windows.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cross.cc19
-rw-r--r--src/lib/cross.h1
-rw-r--r--src/lib/util.cc3
3 files changed, 22 insertions, 1 deletions
diff --git a/src/lib/cross.cc b/src/lib/cross.cc
index 61ec8de5e..47b97baec 100644
--- a/src/lib/cross.cc
+++ b/src/lib/cross.cc
@@ -231,3 +231,22 @@ mount_info ()
return m;
}
+
+boost::filesystem::path
+openssl_path ()
+{
+#ifdef DCPOMATIC_WINDOWS
+
+ wchar_t dir[512];
+ GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir));
+ PathRemoveFileSpec (dir);
+
+ boost::filesystem::path path = dir;
+ path /= "openssl.exe";
+ return path
+#else
+ /* We assume that it's on the path for Linux and OS X */
+ return "openssl";
+#endif
+
+}
diff --git a/src/lib/cross.h b/src/lib/cross.h
index 58fa821c7..c3bb20b47 100644
--- a/src/lib/cross.h
+++ b/src/lib/cross.h
@@ -29,3 +29,4 @@ void dcpomatic_sleep (int);
extern std::string cpu_info ();
extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path, boost::shared_ptr<Log>);
extern std::list<std::pair<std::string, std::string> > mount_info ();
+extern boost::filesystem::path openssl_path ();
diff --git a/src/lib/util.cc b/src/lib/util.cc
index ae3de2d6b..e0495f18b 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -65,6 +65,7 @@ extern "C" {
#include "config.h"
#include "ratio.h"
#include "job.h"
+#include "cross.h"
#ifdef DCPOMATIC_WINDOWS
#include "stack.hpp"
#endif
@@ -824,7 +825,7 @@ make_signer ()
{
boost::filesystem::path const sd = Config::instance()->signer_chain_directory ();
if (boost::filesystem::is_empty (sd)) {
- libdcp::make_signer_chain (sd);
+ libdcp::make_signer_chain (sd, openssl_path ());
}
libdcp::CertificateChain chain;