comparison Framework/Orthanc/Core/HttpClient.cpp @ 43:9621fd6f17c9

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 17:34:20 +0100
parents 533cbc4d520c
children
comparison
equal deleted inserted replaced
42:ee25d35663ac 43:9621fd6f17c9
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