Showing posts with label Self signed certificate. Show all posts
Showing posts with label Self signed certificate. Show all posts

Tuesday, January 31, 2012

MakeCert Error: Too many parameters

I was just reading this MSDN post on creating a self-signed certificate for use with ADFS: http://msdn.microsoft.com/en-us/library/bfsktky3.aspx

The command I need, looks like the following:

Makecert -r 
-pe 
-n CN="www.example.com" 
-b 05/10/2010 
-e 12/22/2011 
-eku 1.3.6.1.5.5.7.3.1 
-ss my 
-sr localmachine 
-sky exchange 
-sp "Microsoft RSA SChannel Cryptographic Provider" 
-sy 12  

If you copy the sample command from the MSDN page above and run it via the command-line, you'll get error "Too many parameters". It turns out the dash used in the MSDN post above is actually character: \u2013 (DASH-EN) and not minus \u002D and it's the minus character that the tool is expecting.

So to make this work, simply replace the hyphen with the minus sign when keying in the command as defined above. In the above sample, I have replaced the incorrect character with the correct one so feel free to just copy and paste it.

I learned this from here http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/1e41910f-2f89-439c-93a6-57e5c391d7ca/

Thanks to Carlos Figueira for finding this.