Exemple #1
0
        public ActionResult RemoveWebServerCertificate([FromServices] ISafeguardLogic safeguard, [FromQuery] bool restart = true)
        {
            safeguard.RemoveWebServerCertificate();

            if (restart)
            {
                safeguard.RestartService();
            }

            return(NoContent());
        }
Exemple #2
0
        public ActionResult InstallWebServerCertificate([FromServices] ISafeguardLogic safeguard, [FromBody] CertificateInfo certInfo, [FromQuery] bool restart = true)
        {
            safeguard.InstallCertificate(certInfo, CertificateType.WebSsl);
            var certificate = safeguard.GetCertificateInfo(CertificateType.WebSsl);

            if (restart)
            {
                safeguard.RestartService();
            }

            return(Ok(certificate));
        }
Exemple #3
0
 public void RestartService()
 {
     _safeguardLogic.RestartService();
 }
Exemple #4
0
        public ActionResult RestartService([FromServices] ISafeguardLogic safeguard)
        {
            safeguard.RestartService();

            return(NoContent());
        }