I want to establish a connection between the server and the client using sockets, using the TLS library for the bonus lock. I looked through many documents (which was not enough for me), but I had no idea how to do this,
I am using BouncyCastle v1.7.48 (runtime version = v2.0.50727) binary and I found this information,
I need to use the namespace Org.BouncyCastle.Crypto.Tls and TlsProtocolHandler .
To achieve TLS connectivity,
- Which API should I use on the server side?
Which API should I use on the client side?
System.IO.Stream inputStream, outputStream; TlsProtocolHandler tls = new TlsProtocolHandler(inputStream, outputStream);
What are the parameters of inputStream and outputStream ?
public virtual void Connect (TlsClient tlsClient);
where TlsClient is an interface , but contains many interfaces inside .
4. How to use the above API? Should I declare new classes and implement methods inside this for everyone?
Please help me with this Bouncy Castle.
EDIT 1: I created one class that inherits from an abstract class called DefaultTlsClient . Then I could create an instance of my class and pass it in for an interface reference. Therefore, I can send such a parameter. tls.Connect(tlsClient);
I do not initialize any parameters other than those mentioned above. (Outlets plugged in before this operation on 2055) But I'm not sure if the handshake is complete or not. My program will go to reading state.
Shri
source share