private void ShowACMEInfo() { var certifyManager = new CertifyManager(); string vaultInfo = certifyManager.GetVaultSummary(); string acmeInfo = certifyManager.GetAcmeSummary(); Console.ForegroundColor = ConsoleColor.DarkYellow; System.Console.WriteLine("Let's Encrypt ACME API: " + acmeInfo); System.Console.WriteLine("ACMESharp Vault: " + vaultInfo); System.Console.WriteLine(""); Console.ForegroundColor = ConsoleColor.White; }
internal void LoadVaultTree() { List <VaultItem> tree = new List <VaultItem>(); // populate registrations var registration = new VaultItem { Name = "Registrations" }; registration.Children = new List <VaultItem>(); var reg = certifyManager.GetRegistrations(); foreach (var r in reg) { r.ItemType = "registration"; registration.Children.Add(r); } this.PrimaryContactEmail = registration.Children.FirstOrDefault()?.Name; tree.Add(registration); // populate identifiers var identifiers = new VaultItem { Name = "Identifiers" }; identifiers.Children = new List <VaultItem>(); var ids = certifyManager.GetIdentifiers(); foreach (var i in ids) { i.ItemType = "identifier"; identifiers.Children.Add(i); } tree.Add(identifiers); // populate identifiers var certs = new VaultItem { Name = "Certificates" }; certs.Children = new List <VaultItem>(); var certlist = certifyManager.GetCertificates(); foreach (var i in ids) { i.ItemType = "certificate"; certs.Children.Add(i); } tree.Add(certs); VaultTree = tree; this.ACMESummary = certifyManager.GetAcmeSummary(); this.VaultSummary = certifyManager.GetVaultSummary(); RaisePropertyChanged(nameof(VaultTree)); }