View expiry date of certificate inside a pfx file stored in Azure KeyVault


may seem basic question, i've created keyvault in azure , have added pfx file containing certificate/publickey .

using c# code i'm trying access public key , want expiry-date attribute details. can see certificate expiry date certificate manager utility in windows, can't seem work out way retrieve same thing in c# code.

//below code i'm using

keyvaultclient client = new keyvaultclient(getaccesstoken);

var keybundle = client.getkeyasync(vaulturi, wrappingkeyname).result;

// after keybundle.key doesn't have necessary details

can provide missing link, current documentation on microsoft site isn't expansive @ present.

hi das,

cross posting answer here reaching here

you should able expiry key bundle below

var keyidentifier = "https://rahulkeyvault.vault.azure.net:443/keys/newkey"; var key = await keyclient.getkeyasync(keyidentifier); var keyexpiry = key.attributes.expires; 

this depends on if have mentioned expiry @ time of creating key setting the -expires flag



please mark posts answers/helpful if answers query. helpful others facing same kind of problem




Microsoft Azure  >  Azure Key Vault



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user