Hi all,
I am new to this mailing list. Thankful if any one is using curl/linux version to and worked on Https.
I have created certificates (PEM format) for client and server using openSSL. I am using Apache server/Linux platform and started server with "server certificate". I configured server to listen HTTPS service at port 443.
I downloaded download.txt correctly from server using command as
$curl --cacert cacert.pem https://10.201.114.32:443/basic/download.txt
I am trying to put /home/mahesh/upload.txt in to the server using curl as, client certificate: cacert.pem
$curl --cacert cacert.pem -F file=@/home/mahesh/upload.txt https://10.201.114.32:443/basic/
But it is failing; please suggest what options to use.
Thanks in advance
Mahesh
P.S: Output put operation (failed) as below:
$ curl --cacert cacert.pem -F file=@/home/upload.txt
-v https://10.201.114.32:443/basic
* About to connect() to 10.201.114.32 port 443
* Trying 10.201.114.32... connected
* Connected to 10.201.114.32 (10.201.114.32) port 443
* successfully set certificate verify locations:
* CAfile: cacert.pem
CApath: none
* SSLv2, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server key exchange (12):
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 DHE-RSA-AES256-SHA
* Server certificate:
* subject: /C=IN/ST=karnataka/O=wipro/OU=wireless/CN=10.201.114.32
* start date: 2006-04-21 05:30:16 GMT
* expire date: 2007-04-21 05:30:16 GMT
* common name: 10.201.114.32 (matched)
* issuer: /O=wipro/OU=motodc/emailAddress=testuser@wipro.com/L=bangalore/ST=karnataka/C=IN/CN=10.201.114.32
* SSL certificate verify ok.
> POST /basic HTTP/1.1
> User-Agent: curl/7.14.0 (i686-pc-linux-gnu) libcurl/7.14.0 OpenSSL/0.9.7f zlib/1.2.2.2 libidn/0.5.15
> Host: 10.201.114.32
> Accept: */*
> Content-Length: 262
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------9a5269051bf9
>
< HTTP/1.1 100 Continue
< HTTP/1.1 301 Moved Permanently
< Date: Fri, 28 Apr 2006 10:22:16 GMT
< Server: Apache/2.2.0 (Unix) mod_ssl/2.2.0 OpenSSL/0.9.8a DAV/2
< Location: https://10.201.114.32/basic/
< Content-Length: 236
< Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://10.201.114.32/basic/">here</a>.</p>
</body></html>
* Connection #0 to host 10.201.114.32 left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):