? add_ssl_verify_option.diff Index: XML/RPC2/Client.php =================================================================== RCS file: /repository/pear/XML_RPC2/XML/RPC2/Client.php,v retrieving revision 1.12 diff -u -r1.12 Client.php --- XML/RPC2/Client.php 22 Jan 2006 01:50:59 -0000 1.12 +++ XML/RPC2/Client.php 24 Jul 2007 15:10:31 -0000 @@ -108,6 +108,13 @@ * @var string */ protected $encoding = 'iso-8859-1'; + + /** + * Hold the SSL verify flag + * + * @var boolean + */ + protected $sslverify = true; // }}} // {{{ remoteCall___() @@ -174,6 +181,12 @@ if (isset($options['uglyStructHack'])) { $this->uglyStructHack = $options['uglyStructHack']; } + if (isset($options['sslverify'])) { + if (!(is_bool($options['sslverify']))) { + throw new XML_RPC2_InvalidSslverifyException(sprintf('SSL verify \'%s\' is not valid', $options['sslverify'])); + } + $this->sslverify = $options['sslverify']; + } } // }}} Index: XML/RPC2/Exception.php =================================================================== RCS file: /repository/pear/XML_RPC2/XML/RPC2/Exception.php,v retrieving revision 1.6 diff -u -r1.6 Exception.php --- XML/RPC2/Exception.php 2 Dec 2006 18:09:49 -0000 1.6 +++ XML/RPC2/Exception.php 24 Jul 2007 15:10:31 -0000 @@ -169,6 +169,20 @@ } /** + * XML_RPC2_InvalidSslverifyException is thrown whenever the XML_RPC2 client is asked to use an invalid XML/RPC SSL verify flag + * + * @category XML + * @package XML_RPC2 + * @author Sergio Carvalho + * @copyright 2004-2006 Sergio Carvalho + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @link http://pear.php.net/package/XML_RPC2 + */ +class XML_RPC2_InvalidSslverifyException extends XML_RPC2_Exception +{ +} + +/** * XML_RPC2_FaultException signals a XML-RPC response that contains a fault element instead of a regular params element. * * @category XML Index: XML/RPC2/Backend/Php/Client.php =================================================================== RCS file: /repository/pear/XML_RPC2/XML/RPC2/Backend/Php/Client.php,v retrieving revision 1.9 diff -u -r1.9 Client.php --- XML/RPC2/Backend/Php/Client.php 22 Jan 2006 02:00:41 -0000 1.9 +++ XML/RPC2/Backend/Php/Client.php 24 Jul 2007 15:10:31 -0000 @@ -100,7 +100,8 @@ $uri = $this->uri; $options = array( 'encoding' => $this->encoding, - 'proxy' => $this->proxy + 'proxy' => $this->proxy, + 'sslverify' => $this->sslverify ); $httpRequest = new XML_RPC2_Util_HTTPRequest($uri, $options); $httpRequest->setPostData($request); Index: XML/RPC2/Backend/Xmlrpcext/Client.php =================================================================== RCS file: /repository/pear/XML_RPC2/XML/RPC2/Backend/Xmlrpcext/Client.php,v retrieving revision 1.13 diff -u -r1.13 Client.php --- XML/RPC2/Backend/Xmlrpcext/Client.php 2 Mar 2007 02:30:58 -0000 1.13 +++ XML/RPC2/Backend/Xmlrpcext/Client.php 24 Jul 2007 15:10:31 -0000 @@ -99,7 +99,8 @@ $uri = $this->uri; $options = array( 'encoding' => $this->encoding, - 'proxy' => $this->proxy + 'proxy' => $this->proxy, + 'sslverify' => $this->sslverify ); $httpRequest = new XML_RPC2_Util_HTTPRequest($uri, $options); $httpRequest->setPostData($request); Index: XML/RPC2/Util/HTTPRequest.php =================================================================== RCS file: /repository/pear/XML_RPC2/XML/RPC2/Util/HTTPRequest.php,v retrieving revision 1.6 diff -u -r1.6 HTTPRequest.php --- XML/RPC2/Util/HTTPRequest.php 22 Jan 2006 02:01:21 -0000 1.6 +++ XML/RPC2/Util/HTTPRequest.php 24 Jul 2007 15:10:32 -0000 @@ -94,6 +94,13 @@ */ private $_encoding='iso-8859-1'; + /** + * SSL verify flag + * + * @var boolean + */ + private $_sslverify=true; + // }}} // {{{ getBody() @@ -157,6 +164,9 @@ } } } + if (isset($params['sslverify'])) { + $this->_sslverify = $params['sslverify']; + } } // }}} @@ -183,6 +193,7 @@ curl_setopt($ch, CURLOPT_URL, $this->_uri) && curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE) && curl_setopt($ch, CURLOPT_POST, 1) && + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->_sslverify) && curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml; charset='.$this->_encoding, 'User-Agent: PEAR_XML_RCP2/0.0.x')) && curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_postData) ) {