Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I use winhttp api to sendrequest to server,but I income the problem, I got 12044 error, I find the error is ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED. Any one know how to solve it?
hConnect = WinHttpConnect(hOpen, L"raw.github.com", INTERNET_DEFAULT_HTTPS_PORT, 0);
if (!hConnect) {
wprintf(L"WinHttpConnect failed (0x%.8X)\n", GetLastError());
break;
}
LPCWSTR types[2];
types[0] = L"text/html";
types[1] = 0;
// use flag WINHTTP_FLAG_SECURE to initiate SSL
hRequest = WinHttpOpenRequest(hConnect, L"GET", L"zpfzzz/test/master/README.md",
NULL, WINHTTP_NO_REFERER, &types[0], WINHTTP_FLAG_SECURE);
Posted
Comments
enhzflep 8-Dec-13 11:05am    
See here: SSL in WinHTTP
CmMac 20-Dec-13 21:48pm    
MSDN say need SSL Client Authentication,but I haven't client Client Authentication, how can I do?
enhzflep 20-Dec-13 23:03pm    
Sorry, no idea. Never tried it myself.

1 solution

There is a nice explanation and suggestion for a solution in MSDN here.
Basically, upon receipt of this error, you open your MY store using cryptoapi and specify an identification certificate you need to have there.
 
Share this answer
 

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