TLS / SSL Support Request (Needed for Chromecast support)

So I’m writing a SmartApp for direct support for Chromecast devices. While it is possible, writing an entire TLS v1.2 library is rather tedious so I’m wondering if send physicalgraph.device.HubAction can add an option for TLS/SSL.

Basically, if this option is set to true, I won’t have to write an entire SSL encapsulator by scratch. The extra code (if sockets are being used) would require Sockets to be connected as so:

SSLContext sc = SSLContext.getInstance(“SSL”);
sc.init(null, new TrustManager[] { new X509TrustAllManager() }, new SecureRandom());
socket = sc.getSocketFactory().createSocket();
socket.connect(address);

This would also allow FTPS connections as well.

Also, if “action” field in HubAction could also support byte[], it will sending raw packets much easier, since the conversion process from String isn’t always accurate.

5 Likes