Having trouble configuring a DSE C# driver to use SSL. I have spun up my own DSE Cluster with one node and node to node encryption as well as client to node encryption turned on. No errors! However below is a small code that I am using to test a that i can connect to the cluster with SSL.
class Program
{
static void Main(string[] args)
{
X509Certificate2Collection collection;
using (var store = new X509Store(StoreLocation.LocalMachine))
{
store.Open(OpenFlags.ReadOnly);
collection = store.Certificates;
}
var cluster = Cluster.Builder()
.AddContactPoints("192.168.14.11")
.WithCredentials("cassandra","cassandra")
.WithSSL(new SSLOptions().SetCertificateCollection(collection))
.Build();
ISession session = cluster.Connect();
global::System.Console.WriteLine("test");
}
}
I keep receiving the following error when it gets to the session:
"Dse.NoHostAvailableException: 'All hosts tried for query failed (tried 192.168.14.11:9042: AuthenticationException 'The remote certificate is invalid according to the validation procedure.')'"
I also imported both the nodes and cacert into my machines local.
On the cluster side it throws the following error: javax.net.ssl.SSLException: Received fatal alert: Cerrtificate_unknown.