comparison Framework/Orthanc/Core/HttpClient.cpp @ 15:da2cf3ace87a

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 17:20:44 +0100
parents 9220cf4a63d5
children
comparison
equal deleted inserted replaced
14:0b9034112fde 15:da2cf3ace87a
35 35
36 #include "Toolbox.h" 36 #include "Toolbox.h"
37 #include "OrthancException.h" 37 #include "OrthancException.h"
38 #include "Logging.h" 38 #include "Logging.h"
39 #include "ChunkedBuffer.h" 39 #include "ChunkedBuffer.h"
40 #include "SystemToolbox.h"
40 41
41 #include <string.h> 42 #include <string.h>
42 #include <curl/curl.h> 43 #include <curl/curl.h>
43 #include <boost/algorithm/string/predicate.hpp> 44 #include <boost/algorithm/string/predicate.hpp>
44 #include <boost/thread/mutex.hpp> 45 #include <boost/thread/mutex.hpp>
771 if (certificateFile.empty()) 772 if (certificateFile.empty())
772 { 773 {
773 throw OrthancException(ErrorCode_ParameterOutOfRange); 774 throw OrthancException(ErrorCode_ParameterOutOfRange);
774 } 775 }
775 776
776 if (!Toolbox::IsRegularFile(certificateFile)) 777 if (!SystemToolbox::IsRegularFile(certificateFile))
777 { 778 {
778 LOG(ERROR) << "Cannot open certificate file: " << certificateFile; 779 LOG(ERROR) << "Cannot open certificate file: " << certificateFile;
779 throw OrthancException(ErrorCode_InexistentFile); 780 throw OrthancException(ErrorCode_InexistentFile);
780 } 781 }
781 782
782 if (!certificateKeyFile.empty() && 783 if (!certificateKeyFile.empty() &&
783 !Toolbox::IsRegularFile(certificateKeyFile)) 784 !SystemToolbox::IsRegularFile(certificateKeyFile))
784 { 785 {
785 LOG(ERROR) << "Cannot open key file: " << certificateKeyFile; 786 LOG(ERROR) << "Cannot open key file: " << certificateKeyFile;
786 throw OrthancException(ErrorCode_InexistentFile); 787 throw OrthancException(ErrorCode_InexistentFile);
787 } 788 }
788 789