Two-way authentication for SSL communication

I'm trying to send information (as a mime file) to a third-party host server that uses two-way authentication. After much persuasion, I received enough information from their technical support staff to find out that this is most likely a type of TLS / SSL connection. They use the handshake of clients and servers. I found the following example: sslstream example . But I have problems using it (TcpClient refuses to see the host address).

Before going too far, I was hoping that someone could point me towards some good examples or additional information about this process. I feel pretty lost.

+4
source share
1 answer

Two-way authentication probably means they require a client certificate. This means that during the handshake, the client side must also provide a certificate to the server. The most common SSL behavior is that only the back end submits a certificate, for example, when you go to a regular site using HTTPS.

As for SslStream, it's pretty simple to use. To be able to present a client certificate, you need to have a certificate in the certificate store or a pfx file that can be loaded into memory at run time.

I found this example that seems good enough. Here is another one . The second does not use client certificates, but you can add them as a parameter to call AuthenticateAsClient.

If TcpClient refuses to see the host address, then this is most likely some kind of connection problem and is not related to the actual SSL implementation.

+3
source

All Articles