Cannot Connect to AWS Database using TLS with Server CA Validation

前端 未结 6 1854
余生分开走
余生分开走 2021-01-18 05:06

AWS documentation states that to connect to my DocumentDB Cluster, I need to use a query string that ends like so ?ssl_ca_certs=rds-combined-ca-bundle.pem&replicaS

6条回答
  •  长发绾君心
    2021-01-18 05:49

    Try adding the RDS CA file into your C# trust store.

                X509Store store = new X509Store(StoreName.Root);
                X509Certificate2 ca = new X509Certificate2();
                try {
                    store.Open(OpenFlags.ReadWrite);
                    store.Add(ca);
                } catch (Exception ex) {
                    Console.WriteLine("Root certificate import failed: " + ex.Message);
                    throw;
                } finally {
                    store.Close();
                }
    

提交回复
热议问题