Reputation: 7747
I would like to create an SSL connection for generic TCP communication. I think I figured out how to do it in the code, using the info here: http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx What I'm having trouble with is creating a cert so I can test this out. I tried makecert.exe testCert, and that created a cert, but apparently it doesn't have a private key associated with it. So what I'm looking for is the simplest procedure to create a cert and get the connection to work.
Upvotes: 5
Views: 442
Reputation: 30714
For anybody else attempting this the pkcs12 certificate created as detailed here openssl question and using the X509Certificate2.CreateFromCertFile method gets past the private key problem. Note I used openssl with cygwin on Windows.
Upvotes: 0
Reputation: 405985
I haven't found a simple way to do this yet, but I found this site helpful a few months back.
O'Reilly also published a book called Network Security Hacks (available on Safari) that has a section starting at Hack #45 on creating your own certificate authority.
Upvotes: 2