WCF Service - MakeCert - Signature and Exchange  
Author Message
R Raghu





PostPosted: Windows Communication Foundation ("Indigo"), WCF Service - MakeCert - Signature and Exchange Top

I am trying to create one certificate with MakeCert for use with WCF service that does both signing and encryption. I know that you can create either one. But I am not sure if it is possible to create one certificate with both options. If any one knows how to do this, please let me know.


Thanks.




Visual Studio 200827  
 
 
R Raghu





PostPosted: Windows Communication Foundation ("Indigo"), WCF Service - MakeCert - Signature and Exchange Top

After serveral trys, the following command worked for me:


MakeCert -sr LocalMachine -pe -n "CN=mytestcertificate.com" -ss My -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

The above command stores the certificate into local machine in personal store. You can then export it to a pfx file by supplying a password. You can also export it to a .cer file. The pfx file is valid for both signature and exchange, which means you can also use it for SSL.