cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl http request for SSLSocket.

From: sonal rajbhoj <sonal.rajbhoj_at_gmail.com>
Date: Fri, 18 Apr 2008 18:31:01 +0530

OS - CentOS

Version - curl 7.12.1 (i686-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a
zlib/1.2.1.2 libidn/0.5.6

* Port 443 is secure port

*1. Using HTTP URL

*curl -v http://127.0.0.1:443/admin/test
* About to connect() to 127.0.0.1 port 443
* Trying 127.0.0.1... * connected
* Connected to 127.0.0.1 (127.0.0.1) port 443
> GET /admin/test HTTP/1.1
User-Agent: curl/7.12.1 (i686-redhat-linux-gnu) libcurl/7.12.1
OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6
Host: 127.0.0.1:443
Pragma: no-cache
Accept: */*
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

*2. Using HTTPS URL for same secure port 443

* curl -v https://127.0.0.1:443/admin/test
* About to connect() to 127.0.0.1 port 443
* Trying 127.0.0.1... * connected
* Connected to 127.0.0.1 (127.0.0.1) port 443
* successfully set certificate verify locations:
* CAfile: /usr/share/ssl/certs/ca-bundle.crt
  CApath: none
* SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
* Closing connection #0
curl: (60) SSL certificate problem, verify that the CA cert is OK.
Details:...........

*3. Server shows following exception logs:
**javax.net.ssl.SSLException*: Unrecognized SSL message, plaintext
connection?
com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown
Source)

com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)

On Fri, Apr 18, 2008 at 6:12 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Fri, 18 Apr 2008, sonal rajbhoj wrote:
>
> Command :* curl http://127.0.0.1:443/admin/test*
> > When the above comman(HTTP request) is fired against the SSLScoket port
> > 443
> > curl returns the Exit status code (0) ideally it should fail and return
> > some
> > error message.
> >
>
> You need to provide more info. Like using -v and show us the full output
> and tell us what curl version on what OS you're using.
>
> In a typical case this should not happen.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>

-- 
Sonal.
Received on 2008-04-18