Step 2 – Exporting Certificate to .CER & .PFX
Once you created you created your self signed certificate you need to export it .CER and .PFX extension. These .CER & .PFX files are used in later parts to import these certificate
Complete below step for “HighTrustTokenCert”. If you created your root authority, we need to export LocalRootCA certificate also.
Steps to Open Certificate Details –
- Click on Windows Icon
- Search for “MMC” (mmc Run Command)
- In Console Root, Go to Files – > Add/Remove Snap In
- Select Certificates for Local Computer -> OK
- You can see different folders for Certificate for Local Computer
- Go to Personal – > Certificates
- Double Click on Your Certificate (HighTrustTokenCert or LocalRootCA). This will open Certificate Details.
Export Certificate to as .CER –
- Open Certificate Details -> Go to “Details” tab.
- Down below, Click on button “Copy to Files” ( this will open export wizard)
- Click “Next” on Certificate Export Wizard
- Choose “No, do not export the private Key”. Click Next
- Choose DER encode binary x.509 (.CER)
- Click Next
- Browse for Path. In my case I added to “C:\Documents\LocalRootCA\HighTrustTokenCert.cer”
- Click Next to finish Wizard
Export Certificate to as .PFX-
- Open Certificate Details -> Go to “Details” tab.
- Down below, Click on button “Copy to Files” ( this will open export wizard)
- Click “Next” on Certificate Export Wizard
- Choose “Yes, export the private Key”. Click Next
- Choose Personal Information Exchange(.pfx)
- Choose Sub Property ” Include all certificates in the certification path if possible”
- Click Next
- Provide password for .PFX file (This will be needed in later part of C# code. for example give pass123
- Browse for Path. In my case I added to “C:\Documents\LocalRootCA\HighTrustTokenCert.pfx”
- Click Next to finish Wizard
By this we exported HighTrustTokenCert certificate as .CER and .PFX file. If you follow Path 2 for certificate generation you need to do the same steps for “LocalRootCA”
Checkout next post to on this topic “How to access SharePoint from WCF”
11,214 total views, 6 views today
0 Comments