cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Error 35

From: Ajit, Kumar (IE10) <ajit.kumar_at_honeywell.com>
Date: Mon, 18 Mar 2002 03:21:23 -0600

It says: "unable to set private key file". it appears in ssluse.c, only
once. it seems some problem with the file_type. Do i need to set something
else?
I have created the certificate and key files by using openSSL.
regards
ajit

> -----Original Message-----
> From: Daniel Stenberg [SMTP:daniel_at_haxx.se]
> Sent: Monday, March 18, 2002 2:46 PM
> To: Ajit, Kumar (IE10)
> Cc: CURL MAILING LIST
> Subject: Re: Error 35
>
> On Mon, 18 Mar 2002, Ajit, Kumar (IE10) wrote:
>
> > i am using Curl::easy perl package to get a file from the apache
> webserver.
> > i did the required settings in httpd.conf file. i have created a
> > certificate and a key file for my perl client. this is the piece of
> setting
> > i am doing in my client code:
> >
> > my $curl Curl::easy:init();
> >
> > Curl::easy:setopt($curl, CURLOPT_SSLVERSION, 2);
> > Curl::easy:setopt($curl, CURLOPT_SSLCERT, "authdata/myclient.crt");
> > Curl::easy:setopt($curl, CURLOPT_SSLKEY, "authdata/myclient.key");
> > Curl::easy:setopt($curl, CURLOPT_CAINFO, "authdata/CAcert.crt");
> > Curl::easy:setopt($curl, CURLOPT_SSL_VERIFYPEER, 2);
>
> 2 is the same as 1 here, that is a non-zero value enables the peer
> verification.
>
> > Curl::easy:setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);
>
> This option however can be set to 0, 1 or 2.
>
> > Curl::easy:setopt($curl, CURLOPT_WRITEFUNCTION, \&myWriteCallback);
> > Curl::easy:setopt($curl, CURLOPT_FILE, *MYOUTPUTFILE);
> > Curl::easy:setopt($curl, CURLOPT_HTTPGET, 0);
>
> Setting CURLOPT_HTTPGET to 0 has no meaning to libcurl. It defaults to
> GET,
> and by setting CURLOPT_HTTPGET to a non-zero value you force a GET (as
> well).
>
> > my $nRet = Curl::easy:perform($curl);
> > if ($nRet != CURLE_OK) {
> > print "Operation failed "."::"."$nRet";
> > die "Exiting....."
> > }
> >
> > When the above piece of code is run, always the program is coming out
> with
> > CURLE_SSL_CONNECT_ERROR (error code :: 35). It seems it's happening
> before
> > any comminication starts with the SSL engine.
> >
> > Is there any problem with the seetings or am i missing something?
>
> I suggests you pass on the CURLOPT_ERRORBUFFER option to get the error
> text
> for what happened, and then you read the error text. It is very likely to
> bring some light onto exactly why this happens. The
> CURLE_SSL_CONNECT_ERROR
> error is returned for several different SSL connection/handshake problems.
>
> Note: I don't know how you pass on the error message area to libcurl using
> the perl interface.
>
> --
> Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-03-18