2
votes

Background

I have a .NET console application client that consumes a Java RESTful Service with TLS Client Authentication enabled (aka Mutual Authentication).

It should be the reverse of this SSL Socket between .Net and Java with client authentication

Problem

  1. I am always getting this error: Could not establish trust relationship for the SSL/TLS secure channel

  2. I have no idea how to configure this correctly both on the client and server.

Steps Performed

  1. The .NET console application is already including the CA, intermediate, and server certificates but the same error is being thrown.

  2. I provided the server a Certificate Signing Request (CSR).

  3. The server signed and provided a signed certificate back to me. The signed certificate is being included in the communications between the client and the server. However, the same error is being thrown.

Can anyone enlighten me on how to get a successful handshake?

1
Have you tried a self-signed one before? - Fildor
Yes, but in this case we're using certificates purchased from a trusted CA. - setzamora
I was just asking to be sure that the issue is not something else than the certificate. - Fildor
Can you call that REST service from browser? - user1516873
Unfortunately no, it's showing an SSL error as well when doing an HTTP GET using a browser on the same machine where the .NET client is. - setzamora

1 Answers

1
votes

This has been resolved.

Here are the steps:

  1. Create a Certificate Signing Request (CSR).
  2. Have the CSR signed by the server.
  3. Get the signed certificate.
  4. Include the signed certificate in the HTTP request.
  5. Make sure to put the Self-Signed CA Certificate in the Local Computer's Trusted Root CA store.

Troubleshooting steps in order (do not skip if a certain step is not successful):

  1. Test with HTTP
  2. Test with HTTPS (one-way authentication)
  3. Test with HTTPS (mutual authentication)