I am working on C# project where tcp transmition between server and client is made using SSL. I created certificate file with makecert program, but it works only on computer where it was generated (although I have installed .cer file). I am almost sure, that the problem lies in parameters which I put into command, but I checked many combinations and none (despit following) worked
makecert -r -pe -n "CN=This is my certificate" -ss my -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 ca.cer
.cer file is used only for ciphering transmition. I don’t use PKI. Furthermore using SSL is “dead requirement” – it must be used, just for be used. Any security issues shouldn’t be considered.
If anyone should answer me, how to create certificate, that will be able to be used by X509Certificate.CreateFromCertFile method I would be delighted.
If you control all of the machines that will use these certificates, you can create a CA that’s trusted by all of the machines, and then issue certificates based on that.
Here are my batch files. The first one creates the CA certificate:
Import the .CER file into the CA certificate store on those machines that must connect to the server (they must trust the CA):
This one creates a server certificate:
Install the .pfx file, and then get the C# server code to use it. This is left as an exercise for the reader.