public ActionResult InstallClientCertificate([FromServices] ISafeguardLogic safeguard, CertificateInfo certInfo) { safeguard.InstallCertificate(certInfo, CertificateType.A2AClient); var certificate = safeguard.GetCertificateInfo(CertificateType.A2AClient); return(Ok(certificate)); }
public ActionResult <ServiceConfiguration> ConfigureSafeguard([FromServices] ISafeguardLogic safeguard, CertificateInfo certFile = null) { if (certFile?.Base64CertificateData != null) { safeguard.InstallCertificate(certFile, CertificateType.A2AClient); } var devOpsConfiguration = safeguard.ConfigureDevOpsService(); return(Ok(devOpsConfiguration)); }
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)); }