0
我使用下面的生成:断开使用HTTPS与Nodemcu
NodeMCU custom build by frightanic.com
.branch: master
.commit: c8ac5cfb912ff206b03dd7c60ffbb2dafb83fe5e
.SSL: true
.modules: file,gpio,http,i2c,net,node,spi,tmr,uart,wifi,tls
build .built on: 2017-06-03 03:24
powered by Lua 5.1.4 on SDK 2.1.0(116b762)
使用HTTP模块,我可以成功地使get调用:
> http.get("http://httpbin.org/ip", nil, function(code, data)
if (code < 0) then
print("HTTP request failed")
else
print(code, data)
end
end)>> >>
> 200 {
"origin": "61.69.19.186"
}
使用HTTPS使等效调用导致超时:
http.get("https://httpbin.org/ip", nil, function(code, data)
if (code < 0) then
print("HTTP request failed")
else
print(code, data)
end
end)>> >>
与控制台上显示以下信息:
HTTP client: Disconnected with error: 9
HTTP client: Connection timeout
从大约一年前一对夫妇的其他类似的问题谈了网模块,并呼吁httpbin.org需要SSL实现的特定版本所需的修复:
HTTPS (SSL) get request with NodeMCU
HTTPS get requests with NodeMCU and ESP8266
构建今天的创建与mbedTLS的TLS/SSL支持。
谢谢你的抬头。看起来像这个错误也出现在使用SDK 1.5.4.1的早期固件中,我下载了它来检查那是:NodeMCU由frightanic.com自定义构建 .branch:1.5.4.1-final .commit:1885a30bd99aec338479aaed77c992dfd97fa8e2 .SSL:true 。模块:文件,gpio,http,i2c,网络,节点,spi,tmr,uart,wifi,tls build .built on:2017-06-07 06:01 由Lua 5.1.4在SDK 1.5上提供支持。 4.1(39cb9a32)结果(如果有): 客户端握手开始。 客户端握手失败 错误:SSL错误80 – mhaselup
不,这是别的。当最后一次检查httpbin.org使用的是2.0之前的Espressif SDK(axTLS vs. mbed TLS)不支持的SNI证书。此外,2.0之前版本仅支持TLS 1.1,只有四个密码套件。 –