title: SSLStream example - how do I get certificates that work?
body: <p>I'm using the SSLStream example from msdn <a href="http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx">here</a>.  The client code "seems" to work fine, as I can connect to google and it at least gets past authentication, but the server doesn't.</p>
  
  <p>From the comments from the msdn page, I used the procedure on <a href="http://www.reliablesoftware.com/DasBlog/PermaLink,guid,6507b2c6-473e-4ddc-9e66-8a161e5df6e9.aspx">this page</a> to generate my own private key, but it just doesn't work.  I get an exception of <code>System.NotSupportedException: The server mode SSL must use a certificate with the associated private key.</code>  So I'm pretty sure whatever I'm doing is wrong.</p>
  
  <p>So my question is simple: how do I get/generate keys that will work for my own little example program from msdn?  It can be self-signed, whatever, but I'm too new to SSL to even know what exactly I need.  All I want to do is to run the example as-given, except for specifying my own certificates for my local server.  And it'd be great to know what I'd have to install on my 2nd machine if I just want to communicate between the two of them too (so it's not a 100% localhost example).</p>
  
  <p>Personally I see this as a flaw in the example document.  It should say "to run this, you need to do A, B, C, etc," but it doesn't.</p>