LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-15-2010, 01:36 AM   #1
Manjunath1847
Member
 
Registered: Mar 2007
Posts: 44

Rep: Reputation: 16
Curl CURLOPT_SSL_CTX_FUNCTION issue


I have an issue with using root certificate, with curl CURLOPT_SSL_CTX_FUNCTION option. I tried one of the example program docs/examples/cacertinmem.c which is avilable along with the curl source download. This program is using CURLOPT_SSL_CTX_FUNCTION to set the hardcoded certificate before doing https transaction. But this program works only if I put the certificate bundle in the proper path. That means https transaction is happening beacuse of the certficate bundle and not from the root certificate which is provided in the program. This is also clear from the verbose output. As per curl documents CURLOPT_SSL_CTX_FUNCTION option actually takes the function pointer as an argument, which is called before SSL transaction so that it allows to change SSL settings. But when I run this program to get the https page, looks like the CURLOPT_SSL_CTX_FUNCTION is not calling the specfied callback funtion.

Please can anyone help me on this.

Thanks in advance.
 
Old 07-16-2010, 05:01 AM   #2
Manjunath1847
Member
 
Registered: Mar 2007
Posts: 44

Original Poster
Rep: Reputation: 16
I am not sure but it Looks like curl handles are caching the options that are set. In the curl source downloaded example program docs/examples/cacertinmem.c, it is first trying to do the https transction without setting the callback certificate set function, after it fails it is retrying by setting the callback certificate set function. When I set the callback certificate set function directly things are working. But retying without and with setting is not working in that example
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Curl Certificate Issue Manjunath1847 Linux - General 1 07-14-2010 01:18 AM
curl bloodsugar Slackware 7 08-17-2009 10:09 AM
curl certificates being refused, possible filepath issue JDska55 Linux - Newbie 3 07-13-2009 07:18 PM
cURL: Server has many IPs, how would I make a cURL script use those IPs to send data? guest Programming 0 04-11-2009 11:42 AM
curl help furqan_sindhu Programming 5 09-13-2007 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration