[Cmake-commits] [cmake-commits] hoffman committed cmCTestSubmitHandler.cxx 1.41 1.42

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Apr 10 12:15:05 EDT 2009


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv12818/Source/CTest

Modified Files:
	cmCTestSubmitHandler.cxx 
Log Message:
ENH: add ability to control ssl cert checking 


Index: cmCTestSubmitHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestSubmitHandler.cxx,v
retrieving revision 1.41
retrieving revision 1.42
diff -C 2 -d -r1.41 -r1.42
*** cmCTestSubmitHandler.cxx	31 Mar 2009 19:30:36 -0000	1.41
--- cmCTestSubmitHandler.cxx	10 Apr 2009 16:15:03 -0000	1.42
***************
*** 246,250 ****
    /* In windows, this will init the winsock stuff */
    ::curl_global_init(CURL_GLOBAL_ALL);
! 
    cmStdString::size_type kk;
    cmCTest::SetOfStrings::const_iterator file;
--- 246,273 ----
    /* In windows, this will init the winsock stuff */
    ::curl_global_init(CURL_GLOBAL_ALL);
!   cmStdString dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
!   cmStdString curlopt(this->CTest->GetCTestConfiguration("CurlOptions"));
!   std::vector<std::string> args;
!   cmSystemTools::ExpandListArgument(curlopt.c_str(), args);
!   bool verifyPeerOff = false;
!   bool verifyHostOff = false;
!   for( std::vector<std::string>::iterator i = args.begin();
!        i != args.end(); ++i)
!     {
!     std::cerr << *i << "\n";
!     if(*i == "CURLOPT_SSL_VERIFYPEER_OFF")
!       {
!       verifyPeerOff = true;
!       }
!     if(*i == "CURLOPT_SSL_VERIFYHOST_OFF")
!       {
!       verifyHostOff = true;
!       }
!     }
!   bool https = false;
!   if(dropMethod == "https")
!     {
!     https = true;
!     }
    cmStdString::size_type kk;
    cmCTest::SetOfStrings::const_iterator file;
***************
*** 255,259 ****
      if(curl)
        {
!       curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
  
        // Using proxy
--- 278,293 ----
      if(curl)
        {
!       if(verifyPeerOff)
!         {
!         cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, 
!                    "  Set CURLOPT_SSL_VERIFYPEER to off\n");
!         curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
!         }
!       if(verifyHostOff)
!         {
!         cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, 
!                    "  Set CURLOPT_SSL_VERIFYHOST to off\n");
!         curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
!         }
  
        // Using proxy



More information about the Cmake-commits mailing list