Certification – Creating self certification files in Windows

// 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

Advertisements
This entry was posted in .NET, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s