node.jsssldnode

How to encrypt a dnode connection?


I am using dnode as an RPC-style library within my Node.js application.

Now I would like to have secure dnode's connection using public-key-cryptography. I guess that this should be possible anyhow using Node.js' TLS module, but I have never used that, hence I am missing some experience with that.

Has anybody already done this, and can provide a small, but complete example on how to set up an encrypted and secured dnode connection?


Solution

  • Okay, I got it.

    All you need to do is to create a TLS server / client and pipe its stream to dnode.

    For an example see my question How to verify that a connection is actually TLS secured?