Windows 10 OS - SSL connection issue

I am using windows 10 OS
Please check the below code snippet i tried to authenticate with certificate
i also tried the following by adding 2 backslash:
trustStorePath: ‘C:\Users\AVVM4J744\Desktop\couchbase\poc\ca.pem’

Below is the output it get

is there anything i am missing in my code?

@desh_naik I am not an expert in the SDK area but perhaps the form of the argument to couchbase.connect that you are using is not aligned with the form the SDK version is expecting. E.g. this (Node.js v4.1) shows the trustStorePath is a field in the same object that contains username and password fields (i.e. not under a “security:” subobject):

cluster = await couchbase.connect('couchbases://localhost', {
  trustStorePath: '/path/to/ca/certificates.pem',
  username: 'Administrator',
  password: 'password',
})

HI Kevin

But in this link it is shown under security

To give you more details e.g if i keep the file in the same folder from where i execute the script as below


and if i give relative path to ca.pem as below it works
security: {
trustStorePath: ‘ca.pem’,
}
But if i try to give absolute path as below it does not work
security: {
trustStorePath: ‘C:\Users\AVVM4J744\Desktop\couchbase\poc\ca.pem’,
}

I want to know how can i make it work with absolute path

Thanks
Desh Naik

Hey @desh_naik ,

I believe this is caused by your use of unescaped backslashes in the path. If you use forward slashes or escape the slashes it should work.

Cheers, Brett

Hey Brett

I tried all below combination nothing is working

C://Users//AVVM4J744//Desktop//couchbase//poc//ca.pem
C:\Users\AVVM4J744\Desktop\couchbase\poc\ca.pem
C:\\Users\\AVVM4J744\\Desktop\\couchbase\\poc\\ca.pem
C:/Users/AVVM4J744/Desktop/couchbase/poc/ca.pem
C:\/Users\/AVVM4J744\/Desktop\/couchbase\/poc\/ca.pem
C:/\Users/\AVVM4J744/\Desktop/\couchbase/\poc/\ca.pem

Thanks
Desh Naik