cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Basic Authentication from command-line cURL

From: pURbA <law_rent_at_yahoo.com>
Date: Wed, 20 Jul 2005 15:41:30 -0700 (PDT)

btw, this is the outpout (-v) from command line:

C:\>curl.exe -v -S -d @xxxx.xml -f
https://username:password@xxx.xxx.net/AuthenticatingXmlServer.aspx
* About to connect() to xxx.xxx.net port 443
* Trying xxx.xxx.xxx.xxx... connected
* Connected to xxx.xxx.net (xxx.xxx.xxx.xxx) port 443
* successfully set certificate verify locations:
* CAfile: C:\curl-7.14.0\curl-ca-bundle.crt
  CApath: none
* SSLv2, Client hello (1):
 SSLv3, TLS handshake, Server hello (2):
 SSLv3, TLS handshake, CERT (11):
 SSLv3, TLS handshake, Server finished (14):
 SSLv3, TLS handshake, Client key exchange (16):
 SSLv3, TLS change cipher, Client hello (1):
 SSLv3, TLS handshake, Finished (20):
 SSLv3, TLS change cipher, Client hello (1):
 SSLv3, TLS handshake, Finished (20):
 SSL connection using AES256-SHA
* Server certificate:
* subject:
/C=US/ST=Virginia/L=Alexandria/O=XXX/OU=STAGING/OU=Terms
of use at www.verisign.com/rpa (c)05/CN=xxx.xxx.net
* start date: 2005-05-26 00:00:00 GMT
* expire date: 2007-05-26 23:59:59 GMT
* common name: xxx.xxx.net (matched)
* issuer: /O=VeriSign Trust
Network/OU=VeriSign, Inc./OU=VeriSign International
Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by
Ref. LIABILITY LTD.(c)97 VeriSign
* SSL certificate verify ok.
* Server auth using Basic with user 'username'
> POST /AuthenticatingXmlServer.aspx HTTP/1.1
> Authorization: Basic
c0VNUlVzZXIxOkUzNnQxRDg2cDMyNA==
> User-Agent: curl/7.14.0 (i586-pc-mingw32msvc)
libcurl/7.14.0 OpenSSL/0.9.7c zlib/1.2.2
> Host: xxx.xxx.net
> Accept: */*
> Content-Length: 2536
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 1656
< Content-Type: text/html
< Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
< Date: Wed, 20 Jul 2005 22:28:48 GMT
* The requested URL returned error: 401
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

i'd better go home and take a rest ^_^

laurent

--- Bill Mercer <bmerc_at_nccer.org> wrote:

> >it doesn't work at all. it always gives me an error
> >message '401.2 - Unauthorized'.
>
> Eh? If your credentials don't work when you use a
> browser, then you
> shouldn't expect them to work with curl.
> First you need to have working credentials that let
> you log into the
> site successfully with a browser. You need to fix
> that first.
>
> >>>> law_rent_at_yahoo.com 07/20/05 02:56PM >>>
> >
> >since it doesn't work from PHP, so i tried it from
> >command line, hoping it might work.
> >
> >so, whenever i send a plaintext username &
> password,
> >curl will encrypt them (not fully encryption) using
> >base64 function, as mentiod by ignacio, right?
> >
> >i'm really confused 8-(. i've been working on this
> too
> >long....
> >
> >any help???
> >
> >thanks !
> >
> >laurent
> >
> >--- Dan Fandrich <dan_at_coneharvesters.com> wrote:
> >
> >> On Wed, Jul 20, 2005 at 09:28:41AM -0700, pURbA
> >> wrote:
> >> > thanx 4 ur reply, man.
> >> >
> >> > i did try it using browser. this is my code:
> >>
> >> So, what did the browser send when it worked?
> How
> >> does that differ from what
> >> your code sends?
> >>
> >> >>> Dan
> >> --
> >> http://www.MoveAnnouncer.com The web
> >> change of address service
> >> Let webmasters know that your web site
> has
> >> moved
> >>
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam? Yahoo! Mail has the best spam
> protection around
> >http://mail.yahoo.com
>
>
> Cheers,
>
> Bill Mercer - National Center for Construction
> Education and Research
> 3600 NW 43rd St
> Gainesville, Florida 32606
> http://www.nccer.org
> Phone 352-334-0911 Fax 352-334-0932
> =============================================
>
>
>
>
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2005-07-21