I have made a simple server using TcpListener and it works great but now I would like the connection to be secure.
The clients that connect would be web servers so does it matter if the certificate is trusted or is that just for web browsers?
I have found muddled answers that are not straight forward!
UPDATED
When I share this application would the user have to make a certificate as well or could all users use the same one? Would using the same one not cause security issues or can you bind the certificate to the application so it cannot be seen?
In other words whats the best practise?
SSL/TLS protocol makes TCP a secure protocol, and whenever an application needs to send sensitive information over the internet, it is a requirement to use the send over SSL. often times the SSL protocol is used to secure — the application network layer — HTTP protocol.
Provides a stream used for client-server communication that uses the Secure Socket Layer (SSL) security protocol to authenticate the server and optionally the client.
Use SslStream class:
Typically, the SslStream class is used with the TcpClient and TcpListener classes. The GetStream method provides a NetworkStream suitable for use with the SslStream class.
There is a full example on the link.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With