Unable to connect through SSL

Hi,
I have been trying to connect with the .Net SDK using SSL and I am unable to.
I have a self-signed SSL certificate generated through the Couchbase web portal.
I have overriden ValidateServerCertficate so that the SSL certificate is considered valid by the framework even though it is self-signed. (I validate the HASH of the certificate, this part works as expected)
I have followed the steps at http://developer.couchbase.com/documentation/server/4.0/sdks/dotnet-2.2/configuring-ssl.html
and installed the certificate in the running client certificate store. (OS Windows 7)

I keep on having the following exception when opening connection with the bucket:
Message The remote certificate is invalid according to the validation procedure.
Thrown from: at Couchbase.IO.SslConnection.d__8.MoveNext()

I was having the problem on SDK 2.2 so I have upgraded to the latest version from nuGet (2.3.9.0) but it does not solve my problem.

We are running Couchbase server version: 4.1.0-5005 Enterprise Edition (build-5005)

Is there anything I am missing to be able to established a secure SSL connection?

Thanks

@RichardAtPosera -

Usually that error occurs because you have a FQDN configured for the server, but your bootstrap list is using IP’s. The work around is to use FQDN’s in your bootstrap URI’s or override this by setting ClientConfiguration.IgnoreRemoteCertificateNameMismatch to true.

-Jeff

Good afternoon,
I have set ignoreRemoteCertificateNameMismatch to true in our app.Config file and that did the trick.

Thanks for the tip! :slight_smile:

Richard

1 Like