Hi,
I have a .NET core 2.2 based couchbase lite client, a 2.5 Sync Gateway and enterprise 6.x server.
I want to use wss to connect and exchange data with the SG in both directions. The client code is shown below.
I have created a self signed X509 certificate with OpenSSL and set the SSLKey and SSLCert as defined here: https://docs.couchbase.com/sync-gateway/current/config-properties.html
In the client I use wss://host:ip .
Questions:
- Is there anything else I need to configure to make wss work?
- Do I have to trust the certifcate CA on the client machine?
- Is it possible to configure the client to use wss without trusting the CA? would be helpful in development?
- I use sync gateway image: https://access.redhat.com/containers/?tab=tags#/registry.connect.redhat.com/couchbase/sync-gateway in openshift, does this image provide any certificates that I can use in development?
Regards,
Faris
> Couchbase.Lite.Support.NetDesktop.Activate();
>
> Database.Log.Console.Level = LogLevel.Verbose;
> Database.Log.Console.Domains = LogDomain.All;
>
> this._database = new Database(DATABASE_NAME);
>
> _urlEndpoint = new URLEndpoint(new Uri($"wss://10.196.176.196:4985/{DATABASE_NAME}"));
>
> _replicatorConfig = new ReplicatorConfiguration(this._database, _urlEndpoint);
> _replicatorConfig.Authenticator = new SessionAuthenticator(sessionId);
> _replicatorConfig.ReplicatorType = ReplicatorType.PushAndPull;
> _replicatorConfig.Continuous = true;
>
> // Jede filiale ist auch ein channel. So werden nur die documente einer filiale fuer einen nutzer repliziert.
> _replicatorConfig.Channels = new List<string>();
> _replicatorConfig.Channels.Add(_filialId);
>
> _replicator = new Replicator(_replicatorConfig);
> _replicator.AddChangeListener(this.ReplicationEventHandler);