makecert.exe to create a certificate for an SslStream
Posted: Tue Mar 13, 2012 7:34 pm
I know that makecert.exe is just for testing purposes, and to get a real one I have to purchase it. But im only going to do tests with it. So here is the situation:
What is the problem? And how can I create a certificate so I can test my program???
- The client connects to the server and creates an SslStream for secure transfer.
- The server creates an SslStream on the connection so the two can communicate together.
- The client authenticates the server with SslStream.AuthenticateAsClient("store.i3c.be")
- The server tries to authenticate with SslStream.AuthenticateAsServer(new X509Certificate(System.IO.Directory.GetCurrentDirectory() + "\\data\\store.i3c.be.cer")) but fails with a NotSupportedException. The message was "The server mode SSL must use a certificate with the associated private key."
What is the problem? And how can I create a certificate so I can test my program???