cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem with SSL connection

From: Iskander Ben mahmoud <salexandre.bm_at_gmail.com>
Date: Wed, 28 Jul 2010 09:15:35 +0200

hi everybody,

Alerady i'm coding an application with MVS in C to get html page code. It
works with a simple http:// url but if i use an ssl link it does not work.
anyone can help me ?

There is the code :
 Code:

#include<stdio.h>
#include<stdlib.h>
#include<curl/curl.h>

int main()
{
    CURL *session=curl_easy_init();
    FILE *inFile = NULL;

    if(session)
   {
     curl_easy_setopt(session,CURLOPT_URL,"https://mysite.com");
     curl_easy_setopt(session,CURLOPT_SSL_VERIFYPEER,0);
     inFile=fopen("code.html","w+");
     curl_easy_setopt(session,CURLOPT_WRITEDATA,inFile);
     curl_easy_setopt(session,CURLOPT_WRITEFUNCTION,fwrite);
     curl_easy_perform(session);
     curl_easy_cleanup(session);
     fclose(inFile);
     return 0;
}

thanks

-- 
Skander Ben Mahmoud
Administrator and Creator of http://www.Pro-Programming.net.
Programmer and Developper.
Projects released : Krypton.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-28