comparison OrthancServer/main.cpp @ 2219:262fcab24024

fix for HttpsCACertificates
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Dec 2016 11:06:41 +0100
parents 728403a6ec1f
children a3a65de1840f
comparison
equal deleted inserted replaced
2218:3eefb84ac0bd 2219:262fcab24024
932 932
933 static bool ConfigureServerContext(IDatabaseWrapper& database, 933 static bool ConfigureServerContext(IDatabaseWrapper& database,
934 IStorageArea& storageArea, 934 IStorageArea& storageArea,
935 OrthancPlugins *plugins) 935 OrthancPlugins *plugins)
936 { 936 {
937 ServerContext context(database, storageArea); 937 // These configuration options must be set before creating the
938 938 // ServerContext, otherwise the possible Lua scripts will not be
939 // able to properly issue HTTP/HTTPS queries
939 HttpClient::ConfigureSsl(Configuration::GetGlobalBoolParameter("HttpsVerifyPeers", true), 940 HttpClient::ConfigureSsl(Configuration::GetGlobalBoolParameter("HttpsVerifyPeers", true),
940 Configuration::GetGlobalStringParameter("HttpsCACertificates", "")); 941 Configuration::InterpretStringParameterAsPath
942 (Configuration::GetGlobalStringParameter("HttpsCACertificates", "")));
941 HttpClient::SetDefaultTimeout(Configuration::GetGlobalUnsignedIntegerParameter("HttpTimeout", 0)); 943 HttpClient::SetDefaultTimeout(Configuration::GetGlobalUnsignedIntegerParameter("HttpTimeout", 0));
942 HttpClient::SetDefaultProxy(Configuration::GetGlobalStringParameter("HttpProxy", "")); 944 HttpClient::SetDefaultProxy(Configuration::GetGlobalStringParameter("HttpProxy", ""));
943 945
944 DicomUserConnection::SetDefaultTimeout(Configuration::GetGlobalUnsignedIntegerParameter("DicomScuTimeout", 10)); 946 DicomUserConnection::SetDefaultTimeout(Configuration::GetGlobalUnsignedIntegerParameter("DicomScuTimeout", 10));
945 947
948 ServerContext context(database, storageArea);
946 context.SetCompressionEnabled(Configuration::GetGlobalBoolParameter("StorageCompression", false)); 949 context.SetCompressionEnabled(Configuration::GetGlobalBoolParameter("StorageCompression", false));
947 context.SetStoreMD5ForAttachments(Configuration::GetGlobalBoolParameter("StoreMD5ForAttachments", true)); 950 context.SetStoreMD5ForAttachments(Configuration::GetGlobalBoolParameter("StoreMD5ForAttachments", true));
948 951
949 try 952 try
950 { 953 {