setCredential and cURL ERROR: 58

  • paladinux

    paladinux - 2011-03-01

    I have this problem:
    I want to connect on a WS that require setCredential.
    this is my code:

    $wsdl       = "";//webEdi fatto da schifo
    $client = new nusoap_client_mime($wsdl, true , false, false, false, false, 300, 300);
        $client->setCredentials($userid, $password, "certificate",  array(
         'sslcertfile' => 'cacert.cer',
         'sslkeyfile' => 'cacert.cer',
         //'passphrase' => '',
         'verifypeer' => FALSE,
         'verifyhost' => FALSE
    $result = $client->call('login', array('userid' => $userid, 'password' => $password));

    The cer file is place on the same folder of clientWS.php (where is the code upside)
    The answer is the same (every position of the file, from root of disk to same level of file):
    2011-03-01 12:41:37.499928 soap_transport_http: cURL ERROR: 58: unable to use client certificate (no key found or wrong pass phrase?)<br>url:<br>content_type: <br>http_code: 0<br>header_size: 0<br>request_size: 0<br>filetime: -1<br>ssl_verify_result: 0<br>redirect_count: 0<br>total_time: 0<br>namelookup_time: 0<br>connect_time: 0.016<br>pretransfer_time: 0<br>size_upload: 0<br>size_download: 0<br>speed_download: 0<br>speed_upload: 0<br>download_content_length: -1<br>upload_content_length: -1<br>starttransfer_time: 0<br>redirect_time: 0<b
    I'm sure that is not the position the problem.
    I'm test with my cer file and the answer is the same..
    I have the end of project tomorrow… is 3 days that I'm crazing 14 hours per day!!
    No help from web: some one can help me, urgently?

  • paladinux

    paladinux - 2011-03-01

    better answer code:

    HTTP Error: cURL ERROR: 58: unable to use client certificate (no key found or wrong pass phrase?)
    http_code: 0
    header_size: 0
    request_size: 0
    filetime: -1
    ssl_verify_result: 0
    redirect_count: 0
    total_time: 0
    namelookup_time: 0
    connect_time: 0.016
    pretransfer_time: 0
    size_upload: 0
    size_download: 0
    speed_download: 0
    speed_upload: 0
    download_content_length: -1
    upload_content_length: -1
    starttransfer_time: 0
    redirect_time: 0
  • paladinux

    paladinux - 2011-03-01

    Hi everyone: the problem is from path of file:
    if you change this:

    'sslcertfile' => 'cacert.cer', 'sslkeyfile' => 'cacert.cer',


    'sslcertfile' =>$path, 'sslkeyfile' =>$path,

    and path is your complete path (like "c:\\Program Files (x86)\\Apache2\\htdocs\\e-Max\\Dev\\WS\\eMax.pem")
    the problem change:
    the server answer with:

    HTTP Error: cURL ERROR: 58: unable to set private key file: 'PATH' type PEM

    …and now??

  • paladinux

    paladinux - 2011-03-03

    No one can help me? Is possible obtain a private key from a pem file ( .cer) ??

  • paladinux

    paladinux - 2011-03-07

    impossible: no one can help me out?
    Do I trash nuSoap and search other software?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks