Ejemplo n.º 1
0
        public ActionResult InstallClientCertificate([FromServices] ISafeguardLogic safeguard, CertificateInfo certInfo)
        {
            safeguard.InstallCertificate(certInfo, CertificateType.A2AClient);
            var certificate = safeguard.GetCertificateInfo(CertificateType.A2AClient);

            return(Ok(certificate));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
        public ActionResult <CertificateInfo> GetWebServerCertificate([FromServices] ISafeguardLogic safeguard)
        {
            var certificate = safeguard.GetCertificateInfo(CertificateType.WebSsl);

            return(Ok(certificate));
        }
Ejemplo n.º 4
0
        public ActionResult <CertificateInfo> GetClientCertificate([FromServices] ISafeguardLogic safeguard)
        {
            var certificate = safeguard.GetCertificateInfo(CertificateType.A2AClient);

            return(Ok(certificate));
        }