Take a look at this post, this likely describes the problem and the fix.
For SDK3 your looking at ClusterOptions.KvIgnoreRemoteCertificateNameMismatch and optionally you can override the validation by proving a custom validation method here: ClusterOptions.KvCertificateCallbackValidation.