Splunk Dev

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel

wajihullahbaig
Explorer

One problem solved OK so the first problem was solved. Now how do I get past this error as the title suggests? Since I am using C# for RESTful services, if I am correct I need to know where I can get certificate and install it on client side so that a successful authentication can be initiated.
I am trying out a simple login using C#.

Please guide. Thank you.

Tags (2)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

This is almost certainly a server name validation problem. You can either install the signing certificate (from $SPLUNK_HOME/etc/auth) into your client's trusted store, or you can bypass the trust in code as indicated here or here.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

This is almost certainly a server name validation problem. You can either install the signing certificate (from $SPLUNK_HOME/etc/auth) into your client's trusted store, or you can bypass the trust in code as indicated here or here.

wajihullahbaig
Explorer

i just added the line -
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

0 Karma

Ayn
Legend

I'm no expert on the subject of how SSL/TLS is handled in C#, but a quick google search on the error message returns results that seem to indicate that the problem lies with the certificate validation. By default Splunk uses self-signed certificates which will generate an error because they can't be validated by a trusted CA. Some more info here:

http://stackoverflow.com/questions/703272/could-not-establish-trust-relationship-for-ssl-tls-secure-...
http://www.google.com/search?q=could+not+establish+trust+relationship+for+the+ssl%2Ftls+secure+chann...

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...