<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>And #2 now done. To add to the trusted CA list we can now add the CA into firmware (like the 3 already there), or put the PEM formatted certificate in /store/trustedca on the module itself. A set of commands (like ’tls trusted reload’, ’tls trusted list’, etc) are also now provided to help management.<div class=""><br class=""></div><div class="">I’ve also added a short document to the user guide to explain this.</div><div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 12 Feb 2020, at 3:25 PM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I managed to get quite a lot done last night, and just committed my changes. Current status:<div class=""><br class=""></div><div class="">#1 is done. An extension had to be made to mongoose to support this, so please update submodules. I’ve added the trusted CAs for openvehicles, dexters (letsencrypt) and pushover.</div><div class=""><br class=""></div><div class="">#3 is done. A couple of lines of code. It is enabled by ‘config set server.v2 tls yes’.</div><div class=""><br class=""></div><div class=""><span style="caret-color: rgb(0, 0, 0);" class="">#4 is done. A couple of lines of code. It is enabled by ‘config set server.v3 tls yes’.</span></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">#5 is done, and live on <a href="http://api.openvehicles.com/" class="">api.openvehicles.com</a>.</span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">#8 can start when ready. Have a look at the ovms_server_v[23] code for an example - it is literally a couple of lines to be added.</span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font class="">I did find a few servers that didn’t support the segment size negotiation option in SSL that we were relying on (including mosquitto!). So had to change my sdkconfig to:</font></div><div class=""><font class=""><br class=""></font></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font class="">CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384</font></div></blockquote><div class=""><font class=""><br class=""></font></div><div class=""><font class="">I suggest you do the same for best compatibility.</font></div><div class=""><font class=""><br class=""></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">The rest is pending. I will work on #2 next, then move on to the iOS App.</span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">Regards, Mark.<br class=""></span></font><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 10 Feb 2020, at 11:24 AM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Given that we use the mongoose library for most of our stuff, adding SSL support should not be hard. This would finally bring strong encryption and server side authentication. Given the number of attacks now on IoT devices that would not be a bad thing.</div><div class=""><br class=""></div><div class="">I think what we need is:</div><div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">A set of helper functions to make it easier for components to use SSL. Build on top of mongoose.<br class=""><br class=""></li><li class="">A way to manage a list of trusted Certificate Authorities, including adding to the trusted list via:<br class=""></li><ul class=""><li class=""><span style="caret-color: rgb(0, 0, 0);" class="">Components providing Certificate Authorities in firmware.</span></li><li class=""><span style="caret-color: rgb(0, 0, 0);" class="">Certificate Authorities in configuration.<br class=""><br class=""></span></li></ul><li class="">Extensions to ovms_server_v2 to support an SSL connection option.<br class=""><br class=""></li><li class="">Extensions to ovms_server_v3 to support an SSL connection option.<br class=""><br class=""></li><li class="">Extensions to the Ovms Server v2 code to support an SSL connection listener.<br class=""><br class=""></li><li class="">Extensions to the iOS App to support an SSL connection option.<br class=""><br class=""></li><li class=""><span style="caret-color: rgb(0, 0, 0);" class="">Extensions to the Android App to support an SSL connection option.</span><br class=""><br class=""></li><li class="">Migration of any components already supporting SSL to this new standardised approach.<br class=""><br class=""></li><li class="">Then we can open up the discussion of the whole thing of passwords. We have far too many of these at the moment (user account+password, vehicle ID, server password, module password, hologram account+password, etc). Once we have an encrypted connection, we don’t need to use the password for encryption, but merely for authentication. That simplifies things, as we can perhaps just use the user account+password for most things (giving access to all vehicles registered under that user account - in a similar way to MQTT does it already for ovms_server_v3).</li></ol></div><div class=""><br class=""></div><div class="">I will take on the majority of this project. I can do #1, #2, #3, #4, #5, and #6).</div><div class=""><br class=""></div><div class="">If anyone has any feedback on requirements, please let me know.</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></body></html>