https获取错误12044

https获取错误12044

本文介绍了winhttp https获取错误12044的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用winhttp api sendrequest到服务器,但我收入问题,我得到12044错误,我发现错误是ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED。任何人都知道如何解决它?

hConnect = WinHttpConnect(hOpen,Lraw.github.com,INTERNET_DEFAULT_HTTPS_PORT,0);

if(!hConnect){

wprintf(LWinHttpConnect失败(0x%.8X)\ n,GetLastError());

休息;

}

LPCWSTR类型[2];

类型[0] = Ltext / html;

类型[1] = 0;

//使用标志WINHTTP_FLAG_SECURE启动SSL

hRequest = WinHttpOpenRequest(hConnect,LGET,Lzpfzzz / test / master / README.md,

NULL,WINHTTP_NO_REFERER,&types [0],WINHTTP_FLAG_SECURE);

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);

推荐答案


这篇关于winhttp https获取错误12044的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 13:14