x509certificate2

How to serialize and deserialize a PFX certificate in Azure Key Vault?

雨燕双飞 提交于 2019-11-26 14:22:33
问题 I have a bunch of strings and pfx certificates, which I want to store in Azure Key vault, where only allowed users/apps will be able to get them. It is not hard to do store a string as a Secret, but how can I serialize a certificate in such way that I could retrieve it and deserialize as an X509Certificate2 object in C#? I tried to store it as a key. Here is the Azure powershell code $securepfxpwd = ConvertTo-SecureString -String 'superSecurePassword' -AsPlainText -Force $key = Add