Certification - Creating self certification files in Windows

less than 1 minute read

1
2
3
4
5
6
7
8
9
10
// create certification for authority
makecert -r -pe -n "CN=Tunnel Project Authority" -ss CA -sr CurrentUser -a sha1 -sky signature -cy authority -sv SampleAuthority.pvk SampleAuthority.cer
// based on above certification of authority, it will generate another certification.
makecert -pe -n "CN=tunnel.project.client" -a sha1 -sky Exchange -eku 1.3.6.1.5.5.7.3.1 -ic SampleAuthority.cer -iv SampleAuthority.pvk -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -sv SampleAuthorityClient.pvk SampleAuthorityClient.cer
// create pfx
pvk2pfx -pvk SampleAuthorityClient.pvk -spc SampleAuthorityClient.cer -pfx SampleAuthorityClient.pfx -po password
// based on above certification of authority, it will generate another certification.
makecert -pe -n "CN=tunnel.project.server" -a sha1 -sky Exchange -eku 1.3.6.1.5.5.7.3.1 -ic SampleAuthority.cer -iv SampleAuthority.pvk -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -sv SampleAuthorityServer.pvk SampleAuthorityServer.cer
// create pfx
pvk2pfx -pvk SampleAuthorityServer.pvk -spc SampleAuthorityServer.cer -pfx SampleAuthorityServer.pfx -po password