Programming :: Openssl Versus Curl - Build An Https Client In 'C' Language
May 6, 2011
I need to build an https client in 'C' language on linux platfrom and my app is a multithreaded one...in each thread it need to send a seperate https request to the same server..and receive response.... I used openssl library for this, i am able to send request to server. but when i am trying to read the socket (using SSL_Read) it's closing connection(returning 0 with error code 29).
View 3 Replies
ADVERTISEMENT
Nov 3, 2010
For some years now I have been able to use openssl (apache-mod_ssl) to process encrypted traffic because I had, in effect, only one host - the main server - as the sole entry in our ssl_vhost.conf file.
Now we are working toward serving a couple of more secure sites for closely related organizations, but with their own distinct identities. This, in the past, would have meant additional static IPs with matching nic cards for starters. But my understanding is that since 2007/8 we have been able to use gnutls (apache-mod_gnutls) which gets around the old problem of Apache not being able to direct name-based traffic because that would not yet have been decoded. This is referred to as SNI - Server Name Indication.
Here my confusion begins. Is there an overlap between SSL and TLS? For instance, I would have generated RSA keys and a self-signed certificate with the genrsa command. Is this sufficient for gnutls or does it need to generate its own keys and certificates? I realize gnutls is relatively a new kid on the block but it is appealing and I'd like to give it a try.
I am working with the Mandriva/Mageia cooker with an x86_64 architecture so all packages are up-to-the-minute.
View 3 Replies
View Related
Sep 15, 2010
I am new to this forum and to Networking as well. I have chosen to implement:
1) SIP Client using C' language
2) Platform: Windows
3)Its going to be on command line
my problem is that I need some reference like books, material or website where I can learn how to write the code from scratch or port the code according to my requirements. My implementation should serve the purpose like two SIP clients should communicate with each other for exchange of Audio data.
View 4 Replies
View Related
Jun 24, 2010
Is there any curl API to configure only the required protocol. If I have proper openssl installed, the installed curl will have all the protocols (like HTTP, HTTPS, FTP, File etc...) supported by default. Is there any way to allow or disallow only some of the protocol at the runtime. Say I need to support only HTTPS, FILE and I dont want to allow HTTP. Is there any way to do this?
View 1 Replies
View Related
Aug 18, 2010
I want to use FIPS mode under linux. With openssl-0.9.8o, I typed "./config fipscanisterbuild" and then typed "make". The compile successful. Then I did a test about fips, below is my test code (main.cpp):
#include <iostream>
#include <openssl/ssl.h>
#include <openssl/fips.h>
int main(int argc, char *argv[])
{
[Code]....
View 2 Replies
View Related
Feb 16, 2011
What is the problem? I receive this message (see in red) when i running this script (below) on bash script file:
error received:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 70 0 70 0 0 321 0 --:--:-- --:--:-- --:--:-- 0
IMAG_DOS.ZIP
[code]....
View 1 Replies
View Related
Sep 6, 2010
I've got an asp page (I can't edit) which I can access with a test user I've setup, however when I try to access to same page via curl, I get the following error:
Code:
<h1> You are not authorized to view this page </h1>
The URL you attempted to reach has an ISAPI or CGI application installed that verifies user credentials before proceeding. This application cannot verify your credentials. There's lots of other text (doubt it's relevant though).
Here's the one liner I'm using:
Code:
curl -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" -u myusername:mypassword [URL]
I've done some searching but cant find anything which doesn't suggest rewriting the asp...
View 1 Replies
View Related
May 25, 2011
I am trying to download a non-existent file from a repository by giving the URL, using curl APIs. It is throwing an error message "The requested URL returned error: 404" but the specified file is downloaded with 0 bytes. My code snippet is as follows :
#include <curl/curl.h>
#include <stdio.h>
#include <math.h>
[code]....
View 9 Replies
View Related
Apr 18, 2011
I am having some issues with downloading images to my website from my suppliers!
I have a text file (extracted from product their product lists) which has all of the image URLs!
I have tried to use php using the below script which was started via a cron job, however exec is blocked and my hoster has told me to use curl..... Is there something that can be written in or with curl to do the same thing?
View 4 Replies
View Related
May 25, 2011
I am trying to resume an aborted download. I have to use the curl_easy_setopt(hnd, CURLOPT_RESUME_FROM_LARGE,(curl_off_t)no. of bytes to be skipped) to set from where to start resuming download. But in run time, how would i put the no. of bytes to be skipped? Its not possible always to see how much is the size of file downloaded already. So is there any way so that prograjm will automatically know from where to start??
View 5 Replies
View Related
Jan 24, 2010
I am using a perl script which uses curl in the background to download files from rapidshare premium,one file at a time. I wanted to know is it possible to use curl and spawn multiple connection at a time,to download the same file in multiple parts?? I don't seem to find an option in curl which does that.
View 1 Replies
View Related
Jun 24, 2011
I am writing a script that is used to submit a package to testflight from my build system. In order to make the presentation as clear as possible I would like to include some basic HTML in the note section, however, using a < or > causes an error in curl. I have tried different variations of quoting and escaping but have not yet been able to find the solution.
Code:
VERSION_HEADER='<strong>Version: </strong>'
VERSION=`cat $VERSION_NUMBER_FILE`
NOTES+=( "$VERSION_HEADER$VERSION
[Code]...
If I use VERSION_HEADER="'<strong>Version: </strong>'" then the single quotes are submitted.
If I use < or > then those are submitted but the receiving api does not decode them correctly.
Can anyone suggest a way to submit exactly: <strong>Version: </strong>
View 3 Replies
View Related
Jun 25, 2010
how to redirect all client http request to https request in squid
View 1 Replies
View Related
May 22, 2011
I have set up certain portions of my web site to be forced https:// How do I force, non https:// protocols. I know this sounds confusing, so let me give you an example.
[Code]...
View 7 Replies
View Related
Mar 7, 2010
Groovy is an object-oriented programming language for the Java platform. I do not have experience in Java, only perl and shell scripts. Recently I have been asked to maintain a software written in groovy (also to make enhancements). So can I learn groovy without knowing java language. or isit I have to learn java before venturing into groovy.
View 1 Replies
View Related
Dec 19, 2008
I am unable to find a description of alsa's programing language, this sort of stuff:
[Code]...
I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.
View 2 Replies
View Related
Mar 27, 2010
I wonder why arrays in the C programming language are pointers to the first element of the array, not the first element of the array itself?
View 14 Replies
View Related
Mar 9, 2011
I am writing a TCP server in C, and the server listens to incoming client connections and accepts them. It then creates a thread to handle the client. The clients are expected to only receive data from my server and not send any data. So if I use a select() call with a recv(), I believe that the recv() will just block forever since there will not be any data coming from the client. If I use a non-blocking recv(), then this will just return a 0 which tells me nothing because the client is not expected to send any data. I am not sure if I have misunderstood some socket concepts, but I need a solution to detect when the client has disconnected so that I can close the socket and stop sending data to the client. As I understand it, simple ACKs etc are not captured by the recv(), and only data sent by the client will cause recv() to return a non-zero value, so I am not sure how to know when the client has disconnected.
View 7 Replies
View Related
Mar 13, 2009
Is there any framework available for network programming in c language just like POCO in c++.
View 1 Replies
View Related
Feb 24, 2010
Which do you prefer and why? Also, I remember someone telling me once that while using space indentation use either 4 spaces or 2 spaces. Don't use 3 spaces. Anyone know why they would say not to use 3 spaces?
View 14 Replies
View Related
Sep 30, 2010
Just coming over from Windows here... where I've been using "CreateProcess" which returns a value depending on whether the process was created successfully or not.
Now I'm trying to create a process on linux and I've been learning about fork/exec, and I've been struggling with the fact that there seems to be no easy way to know (within the original parent process) if exec succeeded or not. (without forcing the parent process to hang around polling it or something).
Anyway, I've now just discovered the posix_spawn function, and it seems exactly what I need. However I'm finding the documentation a little hard to understand. In particular, I can't find actual confirmation that it will definitely return an error if creating the process fails (like CreateProcess does on windows). So can anyone confirm that for me?
The text on the documentation states: "If posix_spawn() or posix_spawnp() fail for any of the reasons that would cause fork() or one of the exec family of functions to fail, an error value shall be returned as described by fork() and exec"
This makes me think it uses exec/fork under the hood, and so I wonder if it can be trusted..?
And also, most of the examples on the internet for creating processes use fork/exec, so I wonder if there is some catch with posix_spawn I haven't read about... (since it seems a much simpler way of doing things)
View 2 Replies
View Related
May 28, 2010
tell me some sites for learning programing language Because i feel confusing for learning C programing language now I got so many questions by my studing and i want to solve them by myself too.
View 14 Replies
View Related
May 10, 2011
I'm trying to setup a kickstart installation and having some trouble with firewall settings. When you do a manual install it gives you the option on first boot to allow https, samba, and nfs4 in the firewall. I have as yet been unable to find the options for doing this in kickstart. Here is my current firewall line:
firewall --enabled --http --ftp --ssh --smtp --trust=eth0
I have tried just adding --https but it errors on me. Am I just missing the keywords to set these up? I have looked but i can't find keywords for any services except telnet that are not already included in my firewall line. Should i be trying to do this with iptables in post rather than in the kickstart itself?
View 1 Replies
View Related
May 29, 2010
I'm working on an application that makes http requests using HttpRequest and it's been doing what I need so far without a problem. Now I need to make https requests as well and when I try to make the request, i get this error message:
Code:
Fatal error: Uncaught exception 'HttpInvalidParamException' with message 'Empty or too short HTTP message: ''' in /home/antoranz/waneesia/html/index.php:0 inner exception 'HttpRequestException' with message 'SSL connect error; gnutls_handshake() failed: A TLS packet with unexpected length was received. (https://www.paypal.com/)' in /home/antoranz/waneesia/html/index.php:104 Stack trace: #0 /home/antoranz/waneesia/html/index.php(0): HttpRequest->send() #1 {main} thrown in /home/antoranz/waneesia/html/index.php on line 0
What's going on?
The project: url
View 1 Replies
View Related
Feb 22, 2010
I would like to download and show a source of an webpage in stdout, but this is a https page with authentication form, which requires logging in. I tried like this:
Code:
wget -q --no-check-certificate --http-user=USERNAME --http-password=PASSWORD https://webpage.domain.com -O - However, it still downloaded only this login page, not the real webpage. Using the Firefox I can authenticate just fine. Any ideas?
View 5 Replies
View Related
Jun 9, 2010
i have written file transfer program using libcurl.
#include <stdio.h>
#include <curl/curl.h>
#include <curl/types.h>
[code]....
View 1 Replies
View Related
Jun 30, 2010
My name is Simon and I have recently moved Ubuntu 10.04 from Windows XP. I am a programmer with a few years under my belt using a range of languages but primarily Microsoft Visual Foxpro. This program was very useful as it allowed me to access tables stored on my system and create programs to manipulate data in a wide variety of ways. Programs could be hobbled together, refined then placed in a menu system.I have been looking at a range of packages to use that would (a) allow me the same interactive experience, (b) allow me access to xbase tables (especially as most of the packages and business clients I have use this format), and can be used to create a GUI program. Ideally the package could create programs that can run relatively easily on Linux and Windows. Why, you might ask? Well unfortunately I have not been able to ditch foxpro, it is kind of unique in its abilities. Consequently I am using XP in VirtualBox to do some of my analysis and report production. I also still run Windows on my slate computer, which is used in the field to collect data.I have investigated Python/Jython, Java, Bash, and a number of others (e.g things that interact with PostSQL, MySQL, etc) but happily admit that I am overwhelmed with alternatives. That said, none quite match my relatively simple requirements stated above. The biggest problem is the lack of interactive data manipulation -- e.g. type an SQL statement and have the result appear immediately, that sort of stuff.
I need a language with strong data access, manipulation and reporting capabilities. I have sizable tables/databases containing millions of records and at present most queries take only a seconds using Visual Foxpro. Most of my investigations push me to the MySQL and similar data repositories, but all have their own format. Essentially I need to import all my data into their system before a language can access the data (note that there are copyright issues preventing this in some situations) - aren't there any programs that can access dbase or foxpro tables directly?The programming language also needs to be relatively mature. I don't want to spend all my time defining window sizes and button locations. Editors/Wizards that help design a GUI interface is preferable. It is imperative the language also has strong string, number, array and table access capabilities. Code should also be intuitive and easy to read. A lot of the languages I have reviewed are not intuitive. To me, functions in the format substr(string, start, lengthsegment) is logical and easy to follow. Things like Str = ${str//search/replace/} are not.
I suppose while I am listing preferences, an interpreter like eclipse would be desirable to help maintain code and format it as you go. Some sort of intelligent feedback as you construct a code snippet showing you what alternatives are available would also be valuable.At present I am leaning towards Python with Eclipse as the program manager, but as stated this setup does not really provide an interactive experience and does not appear to naturally interact with dbase. It appears this option would require considerable setup to get working.Java + Eclipse has been suggested before, especially as it takes away the need to worry about operating systems, but most of the packages I have used based on this language are restricted by library development by Sun Microsystems. The file chooser is a classic example - a known bug has been registered for this library for 5+ years and the problem has not been fixed.
View 9 Replies
View Related
Feb 12, 2011
im trying to build a simple program for my C programming class, this is the source code
#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;
[Code]...
i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?
View 5 Replies
View Related
Mar 7, 2010
i'm trying to write a bash script to upload an image to [URL], but i can't get i working properly. Everytime i try, the html returns me a error saying "Upload is disabled during short maintenance work (ETA 10 minutes). Brb!", while from the browser everything works fine. This is my current command line:
Code: curl -L -b cookie-pix.txt -c newcookie.txt www.pixhost.org/cover-upload -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" -F 0=@/home/admin/Desktop/karm.jpg -F content_type=0 -F press=Upload And this is the html of the form:
[Code]....
View 1 Replies
View Related
Jan 21, 2011
I am looking for a specific forum for the R programming language.
Some thing like the LQ is for linux, that will be nice.
Or something like the cplusplus is for c/c++.
View 2 Replies
View Related