I am using node-red 4.0.5 with Node.js v20.18.1
I am using a curl command to interact with a Daikin airconditioner.
The curl command is:
curl --insecure -H "X-Daikin-uuid: xxxxxxxxxxxxxxxxxxxx" -v "https://192.168.11.194/aircon/get_control_info"
In the terminal window the response is:
pi@raspberrypi:/ $ curl --insecure -H "X-Daikin-uuid: xxxxxxxxxxxxxxxxxxxx" -v "https://<local_ip_address>/aircon/get_control_info"
* Trying 192.168.11.194:443...
* Connected to 192.168.11.194 (192.168.11.194) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: C=JP; ST=Osaka; O=DAIKIN INDUSTRIES, LTD; CN=015F4441494B494E000000430028079C.svr
* start date: May 21 22:49:09 2019 GMT
* expire date: Apr 27 22:49:09 2119 GMT
* issuer: C=JP; ST=Osaka; O=DAIKIN INDUSTRIES, LTD; CN=CA.daikindev.com
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* using HTTP/1.x
> GET /aircon/get_control_info HTTP/1.1
> Host: 192.168.11.194
> User-Agent: curl/7.88.1
> Accept: */*
> X-Daikin-uuid: xxxxxxxxxxxxxxxxxxxx
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Length: 335
< Content-Type: text/plain
<
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, close notify (256):
ret=OK,pow=0,mode=3,adv=,stemp=25.0,shum=50,dt1=18.0,dt2=M,dt3=25.0,dt4=26.0,dt5=26.0,dt7=18.0,dh1=50,dh2=50,dh3=50,dh4=50,dh5=50,dh7=50,dhh=50,b_mode=3,b_stemp=25.0,b_shum=50,alert=255,f_rate=A,b_f_rate=A,dfr1=7,dfr2=A,dfr3=A,dfr4=A,dfr5=A,dfr6=A,dfr7=7,dfrh=A,f_dir=2,b_f_dir=2,dfd1=2,dfd2=2,dfd3=2,dfd4=2,dfd5=2,dfd6=0,dfd7=2,dfdh=0
The output from the exec node is as follows:
Command failed: curl --insecure -H "X-Daikin-uuid: xxxxxxxxxxxxxxxxxxxx" -v "https://<local_ip_address>/aircon/get_control_info"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.168.11.194:443...
* Connected to 192.168.11.194 (192.168.11.194) port 443 (#0)
* ALPN: offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [74 bytes data]
* TLSv1.2 (OUT), TLS alert, handshake failure (552):
} [2 bytes data]
* OpenSSL/3.0.15: error:0A000152:SSL routines::unsafe legacy renegotiation disabled
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
curl: (35) OpenSSL/3.0.15: error:0A000152:SSL routines::unsafe legacy renegotiation disabled
This curl command worked fine in an older version of node-red (3.1.0) with Node.js v18.6.0.
The curl command appears to be ignoring the --insecure option when run from the exec node.
Can anyone assist me to get the curl command to run correctly within node-red 4.0.5 and with node.js 20.18.1?