473,473 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

https post using libcurl

1 New Member
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):
Apr 28 '06 #1
0 10694

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at...
12
by: Grunff | last post by:
I'm experiencing an interesting problem with carrying a php session over from http to https. Much googling later, I'm still stuck. The application is an online shop, where some user data is...
7
by: Masahiro Ito | last post by:
I need to be login to several websites and download files that are https connections. I just tried IPWorks demo, but it does not seem to offer https. Does anyone know an https capable product,...
1
by: Rory | last post by:
I'm just starting to use cURL and having trouble accessing https pages. All I want to do at this stage is get an https page and display it, just to test the https get is working. However, I always...
6
by: Arnaud | last post by:
Hi, I'm trying to translate an asp application in a php way, i'm using Php 4.3.x. I'm going to try an asp newsgroup too, but as it mainly deals with Php, I would like to submit you my probem :...
0
by: Raj | last post by:
Hi, I am newbie to programming with libcurl. the problem is i want to send my gmail username and password outside the browser and get access to my mail. this i am doing with LibCurl. Though i dont...
0
by: Raj | last post by:
Hi, I am newbie to programming with libcurl. the problem is i want to send my gmail username and password outside the browser and get access to my mail. this i am doing with LibCurl. Though i dont...
2
by: Arti | last post by:
Hi, I am trying to access a servlet hosted on Tomcat server using HTTPS Post protocol. I am getting the exception: "The underlying connection was closed: Could not establish trust relationship...
2
by: borucik | last post by:
I am trying to use libcurl with Visual C++ 2005 Express Edition. I downloaded the file from here: http://curl.haxx.se/dlwiz/?type=lib&os=Win32&flav=-&ver=2000%2FXP It is the 7.16.0 version of the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.