Espruino Wifi & TLS #5586
Replies: 1 comment
-
Posted at 2016-09-24 by Ollie It seems it is a problem with one or more of my keys/certs, despite them validating. I grabbed the ones from the google docs tutorial and I have the response I expected Posted at 2016-09-24 by Ollie Double checked my keys, add them back and I get the same error. As before. I followed the instructions here to generate, and sign. https://engineering.circle.com/https-authorized-certs-with-node-js-315e548354a2#.5kba2pm9j I'm on Mac OSX El Capitan. Is there something else I need to be doing? Posted at 2016-09-24 by Ollie Regenerated all the keys, signed them, verified them, and still get the error. I think I'll just use the ones from the tutorial :/ Posted at 2016-09-26 by @gfwilliams Hmm. Strange! I'll see if I can figure out exactly what commands I used to generate the key. Also, I might be able to come up with a better error message than Posted at 2016-09-26 by @gfwilliams Actually with the socket disconnect error, it's saying that the remote server disconnected before it'd managed to complete the handshake. I wonder whether the remote server would have an error logged somewhere? Posted at 2016-09-26 by Ollie I tried a number of servers. Always the same with my keys, all worked with the keys provided in the example. I did notice that my client1-key.pem was much larger than the one from the example. Possible timeouts? Posted at 2016-09-26 by @gfwilliams Maybe. It could be the key size I guess? Maybe try Posted at 2016-09-26 by @MaBecker get details from a server with openssl and curl
bad: Verify return code: 21 (unable to verify the first certificate)
Posted at 2016-09-26 by Ollie 2048 key generated using same process and works fine. Posted at 2016-09-26 by @gfwilliams Great, thanks! I'll update the docs, but will also make an issue to remind me to come up with some kind of HTTPS tutorial Posted at 2016-12-20 by Wilberforce Hi @gfwilliams From here: HTTPS The only board currently supporting this is the Espruino Pico. To use HTTPS simply use it in the URL of any normal HTTP request:
To specify keys and certificates, you can use an options object - see require('tls').connect(...) Does the get with https work without loading keys as implied above? Posted at 2016-12-20 by @gfwilliams It used to - and, as of 30 seconds ago, it does again. If you wait an hour, use the latest build and try again then it should be fine. Obviously it works on Espruino WiFi too - I'll update the docs. Posted at 2016-12-20 by Wilberforce Thanks. Noting the change so I can add to my build. Posted at 2017-01-27 by user69937 I have some issues sending consecutive https requests.
Posted at 2017-01-27 by @gfwilliams Are you scheduling the new request on the You could also try printing Posted at 2017-01-27 by user69937 Yes I scheduled it on the res on close event. Anyways thank for the fast reply. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-24 by Ollie
I'm having some issues with TLS. I want to establish a client to request HTTPS uris.
However, after creating and signing and validating the keys I get an error as follows.
I looked up the error
-0x1
and I can't find anything specific for that error only codes with addtional alphanumeric chars appended.Firmware is the bundled 1.87 that the Espruino Wifi came with. I'm inferring the Espruino Wifi does support TLS and HTTPs as the Pico does.
Beta Was this translation helpful? Give feedback.
All reactions