Houge
Member
|
Download class
Hi,
I'm trying to use Download class for my custom REST server, but all I get is DWNL_ERROR state. I believe that's because Download does not want to work with "http://localhost" address and it is forced to use 80 port on HTTP and 443 on HTTPS.
It resolves addresses by using GetHostAddresses() function, if I specify public IP address (like google address 172.217.8.14) it works correctly, but it fails when using "127.0.0.1" or "localhost".
So what can I do if I want to test Download on localhost and with the use of different port (like 8000)?
P.S. I tried to edit "C:\Windows\System32\drivers\etc\hosts" file (Win10), but nothing changed
(This post was last modified: 09-22-2018 03:14 AM by Houge.)
|
|
09-22-2018 03:07 AM |
|
Esenthel
Administrator
|
|
09-22-2018 10:44 AM |
|
Houge
Member
|
RE: Download class
HTTP now works thanks, but HTTPS is still not.
Previous time the error was at DWNL_CONNECTING state, now is at DWNL_AUTH. Can it be a problem that I use self-signed (not trusted) certificate?
EDIT1:
Looks like _socket.handshake() is called and it returns something like MBEDTLS_X509_BADCERT_NOT_TRUSTED or MBEDTLS_X509_BADCRL_NOT_TRUSTED ( https://tls.mbed.org/api/x509_8h.html)
Can you please add something like flag "ignore certificate trust" in SecureSocket.handshake to use it in Download class?
(This post was last modified: 09-22-2018 08:27 PM by Houge.)
|
|
09-22-2018 04:19 PM |
|
Esenthel
Administrator
|
|
09-23-2018 12:45 AM |
|
Houge
Member
|
RE: Download class
Wow, awesome! Everything works now, thank you so much!
|
|
09-23-2018 02:30 AM |
|