hallian hallian | 2 Sep 00:19 2004
Picon

curl: (58) unable to set certificate file (wrong password?)

Hello -

I have being playing around with openssl and curl and have tried to use curl 
with "https."  This is what I have done.  I have created a CA and then 
server certs.

[root <at> localhost ssl.key]# curl -k --cipher DHE-RSA-AES256-SHA  --cert 
/home/test/newcert.pem --cacert /usr/share/ssl/misc/demoCA/cacert.pem  
https://24.221.29.41:1443/index.html

curl: (58) unable to set certificate file (wrong password?)

now, i did see from the mailing list putting username:password on the same 
command line.   Is it referring to the password via the htaccess which again 
is the something I tried and it did not work.  Any ideas?  Even tried my 
password for creating the cert too?  Not sure which password?

thanks
hallian

a.j.vandenberg02 | 1 Sep 12:19 2004
Picon

RE-3: With Curl the last two lines are missing of all the file in beh eer.t-mobile.nl

Hallo again,

I'm still trying to automatcly download from beheer.t-mobile.nl (with https)
Different user-agents in the call didn't change the false Content_Length in
the header.
I found iehttpheaders on http://www.blunck.info/iehttpheaders.html
A part of the T-Mobile header in IE just before the download:
--------------------------------
Content-Type: application/x-www-form-urlencoded
Connection: Keep-Alive
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: beheer.t-mobile.nl
Content-Length: 16
Cache-Control: no-cache
Cookie: ns_cookietest=true; ns_cookietest=true;
ASPSESSIONIDASAQRRSA=OCNFLHGBIEKNCMJGMJFGFLKO; ns_cookietest=true;
ns_session=true; LEVEL1COOKIE=BEHEER%231%2E11680821;
LEVEL2COOKIE=643036636431383963373565326533636666396263316562363931363361623
66531633435653333
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Mon, 30 Aug 2004 07:19:03 GMT
X-Powered-By: ASP.NET
Content-Disposition: anything;filename=export.tsv
content-length: 929
Content-Type: application/download; name="\export.tsv\"
Expires: Mon, 30 Aug 2004 07:19:03 GMT
Cache-control: private
---------------------------
Conclusion: The content-length IE gives is the same as Mozilla gives and
(Continue reading)

Daniel Stenberg | 2 Sep 10:12 2004
Picon

Re: RE-3: With Curl the last two lines are missing

On Wed, 1 Sep 2004 a.j.vandenberg02 <at> kpn.com wrote:

> Conclusion: The content-length IE gives is the same as Mozilla gives and
> just as wrong.

You mean "is given" not "gives", right?

> Why IE does correctly download te file and Mozilla doesn't is a mistery to 
> me.

Newsflash: different programs deal with bad input in different ways.

> Test this variable in a modified CURL and use that for the size.
> That's why I want to modify lib/transfer.c
> But I can't seem to find a correct Win32 Source to make a modify'd
> executable from.

curl (and libcurl) is distributed in a single source package for all platforms 
it builds and runs on.

> With curl-7.12.1.zip I followed the Microsoft command line style

> call nmake vc-ssl-dll

> .\urldata.h(135) : error C2061: syntax error : identifier 'SSL_CTX'
> .\urldata.h(136) : error C2143: syntax error : missing '{' before '*'

You obviously don't have OpenSSL installed with the headers where the makefile 
assumes them to be. Fix that first, or build without OpenSSL support.

(Continue reading)

Goetz Babin-Ebell | 2 Sep 11:50 2004

Re: curl: (58) unable to set certificate file (wrong password?)

Hello Hallian,

hallian hallian wrote:
> I have being playing around with openssl and curl and have tried to use 
> curl with "https."  This is what I have done.  I have created a CA and 
> then server certs.
> 
> [root <at> localhost ssl.key]# curl -k --cipher DHE-RSA-AES256-SHA  --cert 
> /home/test/newcert.pem --cacert /usr/share/ssl/misc/demoCA/cacert.pem  
> https://24.221.29.41:1443/index.html
> 
> curl: (58) unable to set certificate file (wrong password?)

What is in in /home/test/newcert.pem ?

Calling curl this way it must contain the certificate used to do
client authentication and the private key that belongs to it.

It is better to have the private key in a seperate file and accessing
it with
curl -k --cipher DHE-RSA-AES256-SHA  --cert /home/test/newcert.pem \
  --key /home/test/newkey.pem --cacert /usr/share/ssl/misc/demoCA/cacert.pem

Since curl didn't ask you for the pass phrase for the key,
I assume that /home/test/newcert.pem contains no private key
(or the order cert, key is wrong...)
The reported error is a little bit confusing here.
Perhaps we should have changed it to something like
"failed to set private key (wrong psss phrase or key not found)"

(Continue reading)

Daniel Stenberg | 2 Sep 14:24 2004
Picon

Re: curl: (58) unable to set certificate file (wrong password?)

On Thu, 2 Sep 2004, Goetz Babin-Ebell wrote:

> The reported error is a little bit confusing here. Perhaps we should have 
> changed it to something like "failed to set private key (wrong psss phrase 
> or key not found)"

Really? This problem is detected when the SSL function 
SSL_CTX_use_certificate_chain_file() fails, so it is the certificate file that 
causes the problem.

Perhaps the error message should then instead be:

"unable to use client certificate (no key found or wrong pass phrase)"

(modified the explicitly mention client as well)

?

--

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html

a.j.vandenberg02 | 2 Sep 14:58 2004
Picon

RE-4: With Curl the last two lines are missing

Hello,

Still trying to automaticly download from beheer.t-mobile.nl (with https)

Last night after continuesly trying to build curl-7.12.1 (Win32) from source
I succeeded.
After testing a lot of exports I found another logic in the
size-differences.
Every time the  actual size of the file is exactly 107 bytes more then the
Content_Length in the header.
So I updated lib/transfer.c and build curl-7.12.1 (Win32) from source again.
-----------------------------------
  char *filesize_extra    = NULL; /* To get the extra bytes in Variable
CURL_FILESIZE_EXTRA */ 
  curl_off_t filesize_extra_num;  /* To add extra bytes to Content_Length
*/   
-----------------------------------
     filesize_extra = curl_getenv("CURL_FILESIZE_EXTRA"); /* portable
environment reader */
  if(filesize_extra) {
     filesize_extra_num = curlx_strtoofft(filesize_extra, NULL, 10);
     contentlength = contentlength + filesize_extra_num;
     infof(data, "curl_getenv(\"CURL_FILESIZE_EXTRA\")=%s added to
Content-Length from header, now --> %"
 	           FORMAT_OFF_T " <--- .!!! \n", filesize_extra,
contentlength);
  }
  else {
     infof(data, "Content-Length from header-file --> %" FORMAT_OFF_T " <---
\n", contentlength);
(Continue reading)

Goetz Babin-Ebell | 2 Sep 17:51 2004

Re: curl: (58) unable to set certificate file (wrong password?)


Daniel Stenberg wrote:
> On Thu, 2 Sep 2004, Goetz Babin-Ebell wrote:
> 
>> The reported error is a little bit confusing here. Perhaps we should 
>> have changed it to something like "failed to set private key (wrong 
>> psss phrase or key not found)"
> 
> Really? This problem is detected when the SSL function 
> SSL_CTX_use_certificate_chain_file() fails, so it is the certificate 
> file that causes the problem.

Oups.
Perhaps I should have looked in the source before posting my comment... ;-)

> Perhaps the error message should then instead be:
> 
> "unable to use client certificate (no key found or wrong pass phrase)"
> 
> (modified the explicitly mention client as well)

Yes.
That seems better...

Bye

Goetz

--

-- 
Goetz Babin-Ebell, software designer,
(Continue reading)

smeggeruk | 6 Sep 14:09 2004

Cookie issues

System info: Win '98...broadband connection and basic computer.

cURL vers: Current (7.12)

I have attempted to use your s/w to connect to an account on www.outwar.com 
and download the webpage to collect stats on the account.  However, I can't 
seem to get -b or -c to work when storing cookies.  I should point out that 
the cookies *are* saved to a file (both with using this method or 
--dump-header

The data saved for me is (actual content of cookies edited :-)):

HTTP/1.1 302 Found
Date: Mon, 06 Sep 2004 10:48:38 GMT
Server: Apache/1.3.29 (Unix) mod_throttle/3.1.2 mod_ssl/2.8.15 OpenSSL/0.9.7c 
PHP/4.3.1
X-Powered-By: PHP/4.3.1
X-Accelerated-By: PHPA/1.3.3r2
Set-Cookie: ow_sesid=4325534634643634634532vergreer333; path=/; 
domain=.outwar.com
Set-Cookie: cuserid2=1234567; expires=Mon, 13-Sep-2004 10:48:38 GMT; path=/; 
domain=.outwar.com
Set-Cookie: enc_pass=6k523uj5j5op23j523j5j23iijijd; expires=Mon, 13-Sep-2004 
10:48:38 GMT; path=/; domain=.outwar.com
Set-Cookie: owip=81.134.95.217; expires=Mon, 13-Sep-2004 10:48:38 GMT; path=/; 
domain=.outwar.com
Location: http://www.outwar.com/members.php
Transfer-Encoding: chunked
Content-Type: text/html

(Continue reading)

Daniel Stenberg | 6 Sep 16:29 2004
Picon

Re: Cookie issues

On Mon, 6 Sep 2004, smeggeruk wrote:

> cURL vers: Current (7.12)

The latest version is called 7.12.1

> I have attempted to use your s/w to connect to an account on www.outwar.com 
> and download the webpage to collect stats on the account.  However, I can't 
> seem to get -b or -c to work when storing cookies.  I should point out that 
> the cookies *are* saved to a file (both with using this method or 
> --dump-header

-c is the better way to store cookies.

> The data saved for me is (actual content of cookies edited :-)):

[headers snipped]

And these cookies are saved in the -c cookiejar?

> If I then load (for instance) http://www.outwar.com/pointstore.php the file 
> says that I must be logged into the account to view this page, even though 
> I've given the info via the cookies, I assume.

... and the cookies are actually used in the request? (-v or --trace would 
tell)

> A friend of mine suggested looking at 
> http://www.garshol.priv.no/download/text/http-tut.html and working out how 
> to add the cookie info into the request header, but I dunno what I am doing
(Continue reading)

Sumeet Ratilal Khinvasara | 7 Sep 07:58 2004

help me

  Hi all,

     I have a site which gives some related information.
     
     LINK IS http://www.ojs.dekalbga.org/

     The flow of site is as follows
          First page is just a welcome screen which asks me click on enter link.
          Second page asks me the login catogery ( i am using individual category which does not need password).
          Then the third page is the required page for me.
          
     I have reached up to 2nd page. But i am unable to capture third page.
     When tried to curl the link it takes me some login page which i don't see from browser.
     
     Can anybody help me?
     
     I have provided the link of the site.     

     Thanks in advance.
      sumeet




Gmane