-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WifiClientSecure connect(IPAddress ip, hostport) not working !! #1487
Comments
Here is my actual file attached. Please someone to help me. I need to create a web server within INTRANET not in INTERNET. Therefore, I use private IP stack class c (192.168.1.x) |
serial.println log here. ..... |
I tried 5 different samples original from host name based like "google.com" , "api.github.com" , .... all working fine with connect(host_name, 443), but once I changed to connect( IPAddress, 443) and all get fails ! Can it be bug when your team push BearSSL into this git ? Or, no one has time to chech for ipv4 connect() ever ? Did I miss something here or I miss use connect(ipv4, hostport) ?? |
here is another sample code I tried. I only add ipStrToNum function() and change host to host_ipv4 and put that into connect(ipv4, 443). =============================
============================= |
Wow. Way to overcomplicate things. Set the IPAddress like so:
Then, set Core Debug Level to Verbose in the Tools menu.
|
Can you help me to see what's going on when I switch from google.com back to 192.168.1.210, it's still not working !! I followed link below to set up my server. Not change anything. It must be server problem, but I can use browser to use https://192.168.1.210/phpMyAdmin securly login and also see warning sign from browser ! I also use dos command line to check 443 port C:> telnet 192.168.1.210 443 <== that works. means 443 port is listening. I just don't know why a single TCP connect is so difficult ! telnet also use TCP, browser use TCP, and so is WiFiClientSecure. Did I miss something or any step here ?? Or, I should not use this one tutorial for building my web server ? Or, should I use CA certificate to load like setCA. Any working sample code that can do ca ? Why google.com does not ask me for a .cert ?? How can I do that without pre-load a ca to my test program? =======================
======================= LOG here. Apparently, handshake fail at very first step. so, now the question is how can I build a self-signed SSL/TSL web server ? Can you help me with that ? **connected with hify channel 1 ============= ** |
Google will be a much better resource than me for this. wget -d is a much better testing tool than a browser, which will hide lots of errors from you. |
|
what does that mean "The document has moved "https://192.168.1.210/" ?? Should I need to add some other service for this Virtual Machine (web server) ? I saw connect to 443 is success, and later check self-signed certificate with failed ! so, does that means that I need to put certificate in sketch and feed that to WiFiClientSecure for client initialization ? If yes, how ? can you show me how to feed certificate to sketch ? |
@iamneo2416 please report this issue on ESP8266 forum, here is for ESP32 |
Just include in your code: |
No, you can't. setinsecure() is ESP8266 not ESP32 |
Your application is trying to verify the certificate through a Certification Authority but, due to the fact that is self-signed, this operation fails. |
Hi all, please help.
All WifiClientSecure searched on internet sample code use ** "host name" ** in connect( ), but no sample use IPAddress ipv4 to do connect( ). Recently, I built a web server(apache2) + php + mysql + phpMyAdmin (ubuntu 16.04 apache2 w/TSL). I can use https://192.168.1.210/phpMyAdmin to login to mysql web management page successfully, BUT I cannot use following code to do connect. PLEASE HELP. Can anyone give me a working sample? I can also use command line to do
C:> telnet 192.168.1.210 443 <== that also works. means 443 is listening.
Did I miss something here or I miss use connect(ipv4, hostport) ??
P.S. I followed exactly the same steps to built this web server.
https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-16-04
======================================
The text was updated successfully, but these errors were encountered: