Ejemplo n.º 1
0
 public void UpdateCertificate(string certRef)
 {
     if (UsePowershell)
     {
         powershellManager.UpdateCertificate(certRef);
     }
     else
     {
         var cmd = new ACMESharp.POSH.UpdateCertificate();
         cmd.CertificateRef = certRef;
         cmd.ExecuteCommand();
     }
 }
Ejemplo n.º 2
0
        public void UpdateAndExportCertificate(string domainAlias)
        {
            var certRef = "cert_" + domainAlias;

            try
            {
                powershellManager.UpdateCertificate(certRef);

                if (!CertExists(domainAlias))
                {
                    var certInfo = GetCertificate(certRef);

                    string certId = "=" + certInfo.Id.ToString();
                    //ExportCertificate(certId);

                    if (!CertExists(domainAlias))
                    {
                        //if we have our first cert files, lets export the pfx as well
                        ExportCertificate(certId, pfxOnly: true);
                    }
                }
            }
            catch (Exception exp)
            {
                System.Diagnostics.Debug.WriteLine(exp.ToString());
            }
        }
Ejemplo n.º 3
0
        public void UpdateAndExportCertificate(string certAlias)
        {
            try
            {
                powershellManager.UpdateCertificate(certAlias);
                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());
            }
        }