Hi all,
Does anyone know how to prevent calls to InternetOpenUrl() from failing with error 12045 (ERROR_INTERNET_INVALID_CA)? I have the following code below:
Code:
HINTERNET IntOpen = ::InternetOpen(L"Sample", LOCAL_INTERNET_ACCESS, NULL, 0, 0);
HINTERNET handle = ::InternetOpenUrl(IntOpen, L"https://192.168.1.10/file.txt", NULL, NULL, INTERNET_FLAG_IGNORE_CERT_CN_INVALID, NULL);
if (handle == NULL) {
cout << "Error opening URL, " << GetLastError();
return 1;
}
char buf[1024];
DWORD dwRead = 0;
while (InternetReadFile(handle, buf, sizeof(buf), &dwRead) == TRUE) {
if (dwRead == 0)
break;
cout << buf;
}
This works OK on valid sites, but since my server has a self signed certificate, it fails with error code 12045. I know the INTERNET_FLAG_IGNORE_CERT_CN_INVALID is technically looking for hostname mismatches, and not invalid CA's.
Any help would be appreicated.
Thanks,
Run function every 5 mins ??
I have a function PostMessage()How can I run it every 5 mins ??
uploading video files into mysql in php
hi,I have the video files which i have to upload into mysql db. along with creating thumbnails from the video.can any one help me in this which will be greatful to methank u
image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnail and put it into one directory and save the original file into another, but it seems that when
Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site immediately pop-up window should open and the main page at the back should be disabled.If i click
Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to remove the last comma from the string and can't seem to remove it. I have tried chop, rtrim, substr,
Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added a simple calander tool to the page and added some styles to it but i want to move the month name
PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing following insert statement. I am new to Oracle SPs, so could someone help me to solve the issue.
Table Control
Hi Guru's,
Having problemswith multithreading and prime numbers
I have an assignment when I'm suppose to do the following:
Using CSS to format MySQL query
Hi,If i want to have a news page on my site, which displays all records of a table in descending order by date I am using the below code. I can display it all in a big table but this is a bit boring.