public ActionResult Certificates(EditCertificatesModel model)
        {
            string newSsl = null, newSigning = null;

            if (model.UpdateSslCertificate)
            {
                newSsl = model.UpdatedSslCertificate;
            }
            if (model.UpdateSigningCertificate)
            {
                newSigning = model.UpdatedSigningCertificate;
            }

            if (ConfigurationRepository.SupportsWriteAccess)
            {
                ConfigurationRepository.UpdateCertificates(newSsl, newSigning);
            }

            return RedirectToAction("Index");
        }
        public ActionResult Certificates()
        {
            var model = new EditCertificatesModel
            {
                AvailableCertificates = GetAvailableCertificatesFromStore(),
                
                SigningCertificate = ConfigurationRepository.SigningCertificate.SubjectDistinguishedName,
                SslCertificate = ConfigurationRepository.SslCertificate.SubjectDistinguishedName
            };

            ViewBag.SaveEnabled = ConfigurationRepository.SupportsWriteAccess;
            return View(model);
        }