Closed stc1988 closed 1 month ago
That's unusual. That said, not all curves are supported. You could try disabling use of ECC to fall back to another ciphersuite.
"config": {
"tls": {
"DHE_RSA": false,
"ECDHE_RSA": false
}
}
I added the config section to manifest.json
, and see another error /Users/satoshi/Projects/moddable/modules/crypt/ssl/ssl_alert.js (83) # Break: Error: alert: 2, 40!
.
Thank you for trying. This may be more complex to address. I'll take a look in the coming days.
Some good news. Turning off TLS certificate validation allows the connection to succeed. (Of course, you still need to add ca236.der).
While not a long term solution, this allow things to continue working while working on a proper solution. Please give it a try by modifying these three lines in openaistreamer.js as shown below.
const http = {...device.network.https};
http.socket = {...http.socket, secure: {...http.socket.secure, verify: false}};
return new streamer({
...o,
http,
The actual problem appears to occur while parsing the response. In one case, the curve string hasundefined
where a number is expected. I'll look into that.
While not a long term solution, this allow things to continue working while working on a proper solution. Please give it a try by modifying these three lines in openaistreamer.js as shown below.
const http = {...device.network.https}; http.socket = {...http.socket, secure: {...http.socket.secure, verify: false}}; return new streamer({ ...o, http,
Thank you for suggestion, I confirmed this code works.
I cannot reproduce the undefined
behavior above. Looking deeper, it is necessary to implement the secp384r1
curve for this certificate. I have that working, but it needs some more testing.
Build environment: macOS Moddable SDK version: 3bf520227129bd7f4445f2422b18335346294db5 Target device: Mac simulator
Steps to Reproduce
examples/pins/audioout/openai-stream
using this build command:mcconfig -d -m -p mac
/Users/satoshi/Projects/moddable/modules/files/resource/Resource.c (44) # Break: Resource: Resource not found: ca236.der!
manifest_openaistreamer.json
to setca236
and re-run app./Users/satoshi/Projects/moddable/modules/crypt/etc/x509.js (140) # Break: Error: x509: unsupported curve!