Esempio n. 1
0
        public void UpdateAndExportCertificate(string certAlias)
        {
            try
            {
                if (UsePowershell)
                {
                    powershellManager.UpdateCertificate(certAlias);
                }
                else
                {
                    var cmd = new ACMESharp.POSH.UpdateCertificate();
                    cmd.CertificateRef = certAlias;
                    cmd.ExecuteCommand();
                }

                ReloadVaultConfig();

                var certInfo = GetCertificate(certAlias);

                // if we have our first cert files, lets export the pfx as well
                ExportCertificate(certAlias, pfxOnly: true);
            }
            catch (Exception exp)
            {
                System.Diagnostics.Debug.WriteLine(exp.ToString());
            }
        }
Esempio n. 2
0
 public void UpdateCertificate(string certRef)
 {
     if (UsePowershell)
     {
         powershellManager.UpdateCertificate(certRef);
     }
     else
     {
         var cmd = new ACMESharp.POSH.UpdateCertificate();
         cmd.CertificateRef = certRef;
         cmd.ExecuteCommand();
     }
 }