public ActionResult <CertificateResponse> Post(APICertificateRequest request) { if (request == null) { return(BadRequest()); } _logger.LogDebug($"Calling POST / endpoint "); return(_manager.GenerateSelfSignedCertificate(request)); }
X509Certificate2 InstallCodeSigningCertificate() { var certificate = certificateManager.GenerateSelfSignedCertificate( $"CN={CertificateName}"); certificateManager.InstallCertificateToStore( certificate, StoreName.My, StoreLocation.LocalMachine); certificateManager.InstallCertificateToStore( certificate, StoreName.Root, StoreLocation.LocalMachine); return(certificate); }