简体   繁体   中英

Why does .Pfx exist in my Certificates Collection but not my .Cer?

I have uploaded a couple of SSL cerificates to Azure. One is a.cer and one is a .pfx. I followed the advice in this Azure Blog . I uploaded using the management portal.

I have the 'WEBSITE_LOAD_CERTIFICATE' in my App Setting section and have the two correct thumbprints comma separated.

When I remotely debug my Azure Web Job, I can see that only the .pfx is in the certStore.Certificates collection.

Can I access my .cer in this way?

pfx is a secure container which has both your Private and Public keys, while .cer is just the public Key. The public is needed only by the clients to verify integrity of the signature / decrypt content. While your job will need the private key to sign/encrypt the data.

Both public and private keys can be extracted from the PFX using X509Certificate2 class from .NET. It has a property PublicKey .

Why you uploaded .cer at first place ? You do not need it for SSL with Web Apps.

PS Azure Key Vault may the solution you are looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM