Click here to Skip to main content
15,913,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I am using Wininet with CHttp class.
I want to use the https in my code but whenever I am trying to do so it generates the er
ror "SSL certificate is invalid or incorrect".
I have set the parameters to uncheck the certificate authentication but it doesnt work

My Code is

CHttpConnection *pHttpCon=NULL;

pHttpCon = sess->GetHttpConnection(L"127.0.0.1",1,8000, NULL, NULL);
CHttpFile *pHttpFile=NULL;

pHttpFile = pHttpCon->OpenRequest(CHttpConnection::HTTP_VERB_GET, "/checkuser/auth/", NULL, 1, NULL, NULL, INTERNET_FLAG_SECURE|INTERNET_FLAG_IGNORE_CERT_CN_INVALID|SECURITY_FLAG_IGNORE_UNKNOWN_CA |INTERNET_FLAG_IGNORE_CERT_CN_INVALID |INTERNET_FLAG_IGNORE_CERT_DATE_INVALI);


Please help!!

What I have tried:

Please suggest how to disable ssl certification authentication check in c++ chttp method in wininet
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900