TLS 1.2 + C# + BouncyCastle

2019-05-29 05:35发布

问题:

To support TLS 1.1 and above on WinCE we are using BouncyCastle library, but when making a connection it throws error "Internal TLS error, this could be an attack".

Can someone advice on this.

TcpClient client = new TcpClient();

client.Connect(resolvedIpAddr, PORT_TLS_11);

Org.BouncyCastle.Security.SecureRandom sr = new Org.BouncyCastle.Security.SecureRandom();
TlsProtocolHandler handler = new TlsProtocolHandler(client.GetStream(), sr);

handler.Connect(new MyTlsClient());