Using SSL and SslStream for peer to peer authentication?
Step 1: Generating a self-signed certificate: I downloaded the Certificate.cs class posted by Doug Cook I used this code to generate a .pfx certificate file: byte[] c = Certificate.CreateSelfSignCertificatePfx( “CN=yourhostname.com”, //host name DateTime.Parse(“2000-01-01”), //not valid before DateTime.Parse(“2010-01-01”), //not valid after “mypassword”); //password to encrypt key file using (BinaryWriter binWriter = new BinaryWriter( File.Open(@”testcert.pfx”, FileMode.Create))) { … Read more