SSL curl doesn't work c++

I'm trying to download a page that use ssl. I've to login on that page but I have empty page caused by a srange error.

CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CAPATH, "a.crt"); curl_easy_setopt(curl, CURLOPT_CAINFO, "a.crt"); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_URL, ""); curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT); res = curl_easy_perform(curl); if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); curl_easy_cleanup(curl); } cout << res;

What I have as output is:

* Trying * Connected to ( port 443 (#0) * successfully set certificate verify locations: * CAfile: a.crt CApath: a.crt * Unknown SSL protocol error in connection to * Closing connection 0 curl_easy_perform() failed: SSL connect error 35

I can't understand why Thank's

Category:c# Views:2 Time:2018-06-13
Tags: ssl curl libcurl

Related post

  • php single curl works but multi curl doesn't work? 2012-03-23

    So I was using ampps and then switched to z-wamp thinking it would solve the issue, but it didn't. I have separate "sites" in my localhost (localhost/site1 & localhost/site2) that I'm trying to send multi curl requests to, but for some odd reason

  • Writing a tcp proxy (for http, smtp or similar) in java works non-ssl but doesn't work ssl 2010-04-26

    i'm trying to write a proxy for simple services like http and smtp using java. so far i've got this: class Main { public static final int listenPort = 465, // port to listen on remotePort = 465; // port to connect to public static final String remote

  • Getting users profile image in PHP via curl doesn't work 2011-08-26

    I need the users image as image object within PHP. The obvious choice would be to do the following: $url = ''.$fb_id.'/picture?type=large'; $img = imagecreatefromjpeg($url); This works on my test server, but not on the serv

  • ldapsearch over ssl/tls doesn't work 2012-02-27

    I am trying to use ldapsearch over ssl/tls connection, but it doesn't work: ldapsearch -ZZ -d 5 -b "cn=Users,dc=my,dc=server,dc=com" -s sub -D "cn=mydevice,cn=Users,dc=my,dc=server,dc=com" -h -p 3269 -w "mypass" -x "(cn=test)" ldap_crea

  • cURL doesn't work from command line? 2010-07-09

    I wrote a script to parse some data from a website using cURL and it works fine when I run it in my browser, however when I want to run it in the command line I get the error "call to undefined function curl_init()". Do php scripts run under differen

  • Simple cURL doesn't work 2011-09-20

    I want to use cURL to automatically post a form. This is the form I want to post with cURL: <form action="login/main_login.php" method="post"> <input type="hidden" name="url" value="index.php" /> <input type="submit" value="Submit" /

  • PHP - DENIC whois query with cURL doesn't work well 2012-04-27

    When I check the avability of a .de-domain with fsockopen it delivers always a result, but when do the same with cURL around 75% of the queries fail. curl_errno then delivers error-code 56 (CURLE_RECV_ERROR). When I try to check .com-domain with whoi

  • file_get_contents and curl doesn't work, blocked tcp port problem 2011-07-08

    Im trying to write a joomla module which will parse json data from springer api. I have problem with the method "file_get_contents" and other replacements. My problem is that: Warning: file_get_contents( [function.file-get-cont

  • Running cUrl cmd from Win7 doesn't work, but on Linux it does 2010-05-06

    Like the title says. I'm sending a simple cUrl cmd from Win7 to CouchDB on my Linux box, and it doesn't work. But if I run the same command in Linux, it works. I'm sending this: curl -X POST -d '{"owner":{"fname":"test",

  • Windows Service Hosting WCF Objects over SSL (https) - Custom JSON Error Handling Doesn't Work 2010-06-09

    I will first show the code that works in a non-ssl (http) environment. This code uses a custom json error handler, and all errors thrown, do get bubbled up to the client javascript (ajax). // Create webservice endpoint WebHttpBinding binding = new We

  • Azure mod-rewrite to SSL doesn't work 2011-08-16

    I have deployed an ASP.NET web application to Azure running in a web role. It is configured with a DNS name like '' and SSL (the certificate is self-signed, meaning we get a certificate warning but otherwise this is all set up and w

  • Sending a POST with PHP doesn't work with curl or file_get_contents, just normal bash CURL 2011-11-24

    I'm having some serious problems sending a POST. Using curl on the shell, my POST works perfectly. However, when using PHP curl, or file_get_contents, it doesn't work at all. I get a 500 error from the webserver. curl -X POST -H"Content-Type:applicat

  • Cakephp doesn't work after installing php5-curl package 2012-03-28

    I have an android app, it call a function of a web-server (using cakephp). And it return error like this 'call to undefined function curl_init()'. I do some search on google and try to fix that error by install php5-curl package, but after installing

  • Mod rewrite doesn't work on SSL 2012-04-28

    Here is my rewrite code: ## File Security <FilesMatch "\.(htaccess)$"> Order Allow,Deny Deny from all </FilesMatch> #### Apache directory listing rules #### DirectoryIndex index.php index.htm index.html IndexIgnore * #### Rewrite rules fo

  • RewriteRule Query String doesn't work with two parameters using curl 2015-01-26

    I have a problem when sending two dates as parameters using curl + apache RewriteRule, this is the command: curl -u password:user -X GET localhost/api/news/?datefrom=2014-01-29&dateto=2015-01-15 My .htaccess has the following rule: RewriteRule ^(

  • pycurl fails but curl (from bash) works in ubuntu 2009-02-20

    I'm using curl and pycurl to connect to a secure 3rd party api and when I use pycurl I'm getting authentication errors back from the server, but when I use curl on the command line and do the same thing it works. I set both to verbose mode and am see

  • PHP OpenID doesn't work with Google/Yahoo and 'hacks' fix it- are they safe? 2010-06-15

    I've been experimenting with OpenID, and have set up a sample web page to access using my OpenID account. I'm using the Php OpenID Library by Janrain and it wasn't working with my Google Account. A little research led me to this question, which sugge

  • SSL/cUrl/PHP requests failing in Zend server 2012-02-23

    I have a dev VM running Ubuntu 11.10, and can't get PHP cUrl requests to work for SSL urls. No problem using cUrl for SSL or non-SSL urls over the CLI, or non-SSL urls through PHP cUrl. Only SSL urls via cUrl in PHP. When I attempt any SSL request, I

  • iPhone SSL client certificate not working 2009-02-23

    Authenticating user with RSA certificate through iPhone' Safari browser not working with IIS website. I cant get it working. IIS just gives up with "client certificate required" error and safari doesn't provide certificate. Client: iPhone 3G latest f

  • Setting CATALINA_OPTS for tomcat6 on windows doesn't work 2009-09-13

    I'm trying to setup Tomcat6 to work with JMX on Windows Vista 64. To do that I need to pass the parameters below to Tomcat6. What I do in command prompt. (that doesn't work) set CATALINA_OPTS="

  • PHP cURL to POST works, but not when I POST without cURL - What am I missing? 2010-09-03

    I am in a situation where I cannot use PHP cURL module to POST my form data. I have found a great blog post showing how to POST without using cURL here: HTTP POST from PHP, without cURL Here's my problem though. When I attempt to send my POST request

  • Current version of the rmagick gem (2.13.1) doesn't work with current version of ImageMagick (6.6.4) 2010-10-09

    I'm on OSX Snow Leopard though I think this may not be a platform-specific issue. The problem is I've wasted hours of my life trying to get gem install rmagick to work and I'm hoping to save the next person that grief. I believe the core problem is s

  • Why this request doesn't work? 2010-10-19

    I want to make a simple stupid twitter app using Twitter API. If I request this page from my browser it does work: but if I request this page from python using urllib or urllib2 most

  • How do I get an HTTPS request with SSL client cert to work with Ruby EventMachine? 2010-10-27

    I am trying to access an HTTPS web service that uses SSL cert authentication using Ruby EventMachine but I am not getting it to work. I have written the following simple code block to test it end-to-end: require 'rubygems' require 'em-http' EventMach

  • Animated transition doesn't work correctly in landscape orientation 2011-01-16

    My app only supports the landscape right orientation. I'm trying to transition into a view controller's view, but when it performs the transition animation (such as curl up), the view is rotated 90 degrees (so, the simulator is still in landscape-rig

Copyright (C), All Rights Reserved.

processed in 0.103 (s). 11 q(s)