Friday, November 9, 2012

Create self signed certificate

Visual studio comes with an exquisite tool to create a self signed certificate which you can use for Exchange/IIS/ADFS/whatever you like.
makecert -r -pe -n "" -e 01/01/2020 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
Note that this will store the certificate in your local machine certificate store but it’s marked as “private key exportable” (-pe) so you can export it from there.

 I have also created a .bat file in order to automate the localhost certificate generation. Don't forget to export the ca.localhost certificate and add it as a trusteed root certificate authority.

No comments: