Securely Communicating with Server

There are numerous solutions. A few:

  1. The Glowfish SSL client. It’s kind of big, but it seems to work. That will allow you to make SSL connections directly from your Particle device.
    HTTPS client is here for the Photon! - by the glowfi.sh Team

  2. Webhooks. If your data uploads fit into the time/size constraints of event publishing, you can use a web hook to simply Particle.publish from your code and have the web hook convert it into an SSL request to your server. (The data communication between your device and the cloud is also encrypted.)
    https://docs.particle.io/guide/tools-and-features/webhooks/

  3. A custom hybrid solution. Since you control your own server, you have more options. You might have the Particle device send a private publish event that it wants to connect. Your server subscribes to particle events and receives this, then sends an event or particle function back with, say an AES session key you use to encrypt data with the regular TCPClient. This is much simpler than the whole TLS stack because it leverage the public key and session encryption built into the Particle cloud support.

1 Like