Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-6063

.Net Core: Connecting with SSL

    XMLWordPrintable

Details

    Description

      This is targeted for windows machines mostly.
      We should add clarification on how to do it for Linux or Mac OSs.

      Steps on Mac:

      1. Assuming you have a rootCA
      2. take the ca.crt (or copy paste as in the docs from the UI) and double click it
      3. add it to "system" and approve with you password or fingerprint
      4. now you have a non trusted certificate, if you enable ssl in your C# code, you will get an exception

      4.  

      var cluster = new Cluster(new ClientConfiguration { 
      Servers = new List<Uri> { new Uri("http://<servername>") }, 
      UseSsl = true 
       });
      

       

       

      5. Exception: 

       Unhandled exception. Couchbase.Configuration.Server.Serialization.BootstrapException: Could not bootstrap - check inner exceptions for details. (One or more errors occurred. (The remote certificate is invalid according to the validation procedure.)) (Could not bootstrap with CCCP. (One or more errors occurred. (The remote certificate is invalid according to the validation procedure.))) (Could not bootstrap from configured servers list.)
       
      

      6.  Now you need to trust the certificate by double clicking on it (as seen in the image above). then expand the "trust" area, and mark it as trusted instead of system default. exit and approve.

      now it would work.

       

       

       

       

       

       

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            There are no comments yet on this issue.

            People

              richard.smedley Richard Smedley
              roi.katz Roi Katz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty