views:

68

answers:

1

All,

I am making a programming that will be able to download content from various websites on and off of my local network.To do this, I must use the libs and c++ for compatibility reasons. So far I have been able to successfully access a normal HTTP page, and an HTTPS page on the web. Example:

 HRESULT res = URLDownloadToFile( NULL,
          LPCTSTR(CString("https://www.google.com/")),
          LPCTSTR(CString("websitecontent.txt")),
          0,
          NULL);

There are two things I am unable to do: 1) Access a local network resource that uses a local CA cert.

2) Access a local network resource that uses a local CA cert and requests client authentication via client certificate.

In the first case I think that windows is disallowing the connection because it is not on a windows list of trusted CA's.

In the second I think I need to figure out a way to integrate a client cert/private key into the call to URLDownloadToFile but I don't know how to accomplish this. In addition, I would also have to tell windows to trust the local CA.

Any help would be appreciated.

A: 

I think you need to check that the certificate chain is trusted in Internet Explorer.

Better, use libcurl :)

tholomew
Looks like some really good stuff, but I also get the sense this isn't a default install on Windows. Part of the issue is I need to use libs that will let me just plop this .exe onto any winxp and later machine and just have it work.
themaestro
You can perhaps statically link libcurl into your application.
tholomew