Beispiel #1
0
        private static async Task ListAllKeyVersions(KeyVaultHelpers kv, string keyName)
        {
            var keyVersionPages = await kv.GetKeyVersions(keyName);

            foreach (var keyVersion in keyVersionPages)
            {
                Output(keyVersion);

                var vid        = keyVersion.Identifier;
                var vidVersion = vid.Version;

                if (keyVersion.Attributes.Enabled == true)
                {
                    var keyBundle = await kv.GetKey(keyName, vidVersion);

                    Output(keyBundle);
                }
            }
        }
Beispiel #2
0
        private static async Task ListAllKeys(KeyVaultHelpers kv)
        {
            var keyPages = await kv.GetKeys();

            foreach (var keyItem in keyPages)
            {
                Console.WriteLine();

                Output(keyItem);

                var keyName = keyItem.Identifier.Name;

                if (keyItem.Attributes.Enabled == true)
                {
                    var keyBundle = await kv.GetKey(keyName);

                    Output(keyBundle);
                }

                await ListAllKeyVersions(kv, keyName);
            }
        }