Reputation: 1407
I'm running Cassandra 3.9.
I refered to Connect to Cassandra Apache with SSL using cassandra-driver in Node.js before I created this post, but I couldn't solve my problem.
I followed along this datastax documentaion to enable SSL encryption for node-to-node and client-to-node.
I don't have .pem
files that are assigned to key
, cert
, and ca
as described in the referred post.
All files I got after following the datastax documentation were gen_rootCa_cert.conf
, rootCa.crt
, rootCa.key
, rootCa.srl
, 54.112.38.22.csr
, 54.112.38.22.crt_signed
, 54.112.38.22.jks
, server-keystore.jks
, and server-truststore.jks
.
Do I need to create other files such as those .pem
files for sslOptions
to work?
If the existent files are all I need, which file should be assigned to which option?
Upvotes: 0
Views: 969
Reputation: 1407
Do this.
var fs = require("fs");
var sslOptions = {
key : fs.readFileSync("./rootCa.key"),
cert : fs.readFileSync("./rootCa.crt")
};
Upvotes: 1