Click here to Skip to main content
15,886,578 members
Articles / Web Development / IIS
Tip/Trick

Create self signed key...the easy way

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
30 Jan 2010CPOL 9.3K   4  
This is a short bat program to create a self signed key (with private key), if you call the bat "makecertif.bat", to create a key named ServerKey you need to type :makecertif.bat ServerKey, it will create ServerKey.pfx, a certificate with a private key you can use to secure a web site in...
This is a short bat program to create a self signed key (with private key), if you call the bat "makecertif.bat", to create a key named ServerKey you need to type :

makecertif.bat ServerKey, it will create ServerKey.pfx, a certificate with a private key you can use to secure a web site in IIS, or to secure a WCF service or to use to authenticate a client.

You need to put the script in Windows SDK bin directory (mine is C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin).

VB
makecert -r -pe -n "CN=CompanyXYZ Server" -b 01/01/2007 -e 01/01/2012 -sky exchange %1.cer -sv %1.pvk
pvk2pfx.exe -pvk %1.pvk -spc %1.cer -pfx %1.pfx
del %1.cer
del %1.pvk

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Freelance
France France
I am currently the CTO of Metaco, we are leveraging the Bitcoin Blockchain for delivering financial services.

I also developed a tool to make IaaS on Azure more easy to use IaaS Management Studio.

If you want to contact me, go this way Smile | :)

Comments and Discussions

 
-- There are no messages in this forum --