[英]How to configure sslOptions using Node.js driver for Cassandra?
I'm running Cassandra 3.9. 我正在运行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. 在创建本文之前,我曾在Node.js中使用Cassandra-driver提到了使用SSL连接到Cassandra Apache ,但是我无法解决问题。
I followed along this datastax documentaion to enable SSL encryption for node-to-node and client-to-node. 我遵循了此datastax文档,以对节点到节点和客户端到节点启用SSL加密。
I don't have .pem
files that are assigned to key
, cert
, and ca
as described in the referred post. 我没有如引用的文章所述分配给
key
, cert
和ca
.pem
文件。
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
. 我遵循datastax文档后得到的所有文件都是
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
,和server-truststore.jks
。
Do I need to create other files such as those .pem
files for sslOptions
to work? 我是否需要创建其他文件(例如那些
.pem
文件)才能使sslOptions
正常工作?
If the existent files are all I need, which file should be assigned to which option? 如果我只需要现有的文件,应该将哪个文件分配给哪个选项?
Do this. 做这个。
var fs = require("fs");
var sslOptions = {
key : fs.readFileSync("./rootCa.key"),
cert : fs.readFileSync("./rootCa.crt")
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.