HTTPS not working?


#1

Hi Jules,

I’m trying to open an https URL on Windows and it fail.
This works fine on OSX though

I’m trying with the following code

juce::URL url("https://www.gmail.com");
juce::InputStream *pIStream = url.createInputStream(false);

Is there something that needs to be done on Windows to supports HTTPS ? (library to link against or something like that)

Thanks,


#2

No… it should work AFAIK. Could be a security/permissions thing…?


#3

security/permissions on what ?

FWIW, my test on OSX is on the same network and it works fine with a browser on the same windows platform.

It fails when calling HttpSendRequestEx in openHTTPConnection


#4

is there a HRESULT that gives any clues?


#5

12038 ERROR_INTERNET_SEC_CERT_CN_INVALID
SSL certificate common name (host name field) is incorrect.
For example, if you entered http://www.server.com and the common
name on the certificate says http://www.different.com.

Looks like that using INTERNET_FLAG_IGNORE_CERT_CN_INVALID works fine.

Don’t know if this should be added by default to match OSX behavior


#6

Yes… I guess so…


#7

My bad, OSX fails as well.
I was tricked as the stream returned was not NULL, but actually the returned stream contains the text corresponding to the Windows error.

So better to remove your modifications from the Windows code.

Apologies !


#8

Drat! Ok, thanks.