by rob [rob at seerobcode dot com] posted on 2008/09/11 |
|
I\'m trying to replicate this functionality using DH/anonymous cipher SSL_DH_anon_WITH_RC4_128_MD5, do I use this library or the .NET SSLStream library?
I\'m currently using IKVM but it\'s making the download size 13MB!! Need to cut it down so looking for an alternative library.
Java code looks like this:
factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
//socket = (SSLSocket)factory.createSocket(host, port);
socket = (SSLSocket)factory.createSocket(new java.net.Socket(host, port), host, port, true);
sendQ = new Queue<string>();
// enable all the suites
string[] supported = socket.getSupportedCipherSuites();
socket.setEnabledCipherSuites(supported);
socket.startHandshake();
reader = new InputStreamReader(socket.getInputStream());
writer = new java.io.PrintWriter(socket.getOutputStream());
|