cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: PHP nuSoap (cURL) vs AXIS server

From: Supporto Tecnico eMax <support_at_eMax.it>
Date: Mon, 7 Mar 2011 15:44:00 +0100

>From: Ben Noordhuis <info_at_bnoordhuis.nl>
>Date: Mon, 7 Mar 2011 12:46:44 +0100
[..cutted..]
>The error message seems to indicate that X.509 / PKCS12 client
>authentication is attempted but it's hard to tell without a more
>complete code sample.

Thanks Ben for help: for me is indispensable,
a complete code I think is not helpfull because I don't use directly cURL
but a class that use cURL: nuSoap (nuSoap homepage here:
https://sourceforge.net/projects/nusoap/ ).
Therefore this my code.
<?php
$sql = "SELECT * FROM wsIndirizzi WHERE idWS='".$idWS."' LIMIT 1";
$WSINDIRIZZO = mysql_fetch_array (mysql_query ( $sql ));
$wsdl = $WSINDIRIZZO ['Indirizzo']; //compatibilità pre WSINDIRIZZO
// https://weg.rm.enel.it/axis/rpcEdi.do/urn:SoapEdi?wsdl
$client = new nusoap_client_mime($wsdl, true , false, false, false, false,
300, 300);
// Cerco se ci sono errori
$err = $client->getError();
if ($err) {
    // Mostro l'errore
    echo '<h2>Errore nella costruzione </h2><pre>' . $err . '</pre>';
}
if ($WSINDIRIZZO['idTipo']==2) {
        $client->setCredentials("","","certificate", array(
                "sslcertfile" => realpath("c:\\Program Files
(x86)\\xampp\\htdocs\\candi2.cer"),
// "sslkeyfile" => realpath("c:\\Program Files
(x86)\\xampp\\htdocs\\donthave.key"),
// "passphrase" => "",
// "certpassword" => "paladin",//OPTIONAL
// "verifypeer" => 0, //OPTIONAL - don't work
// "verifyhost" => 0 //OPTIONAL - don't work
                 )
}

The code that I change is on row 2478
I force : $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0);
                        $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0);

the complete class is downlodable on
http://sourceforge.net/projects/nusoap/files/
Thanks,
Francesco

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2011-03-07