public void IssueCrl(string id, bool copyOnline = true) { Console.Write($"Issuing CRL for certificate {id}..."); var context = new IssueCrlContext(id, this); GenerateCrl(context); ConvertCrl(context, copyOnline); Console.WriteLine(" done."); }
private void GenerateCrl(IssueCrlContext context) { var arguments = new List <string> { "ca", "-gencrl", "-out", context.IssuerCrlPemFilePath, "-config", context.ConfigFilePath, }; Execute(context, arguments.ToArray()); }
private void ConvertCrl(IssueCrlContext context, bool copyOnline) { var arguments = new List <string> { "crl", "-in", context.IssuerCrlPemFilePath, "-inform", "pem", "-out", context.IssuerCrlFilePath, "-outform", "der", }; Execute(context, arguments.ToArray()); if (copyOnline) { File.Copy( context.IssuerCrlFilePath, Path.Combine(OnlineDirectoryPath, Path.GetFileName(context.IssuerCrlFilePath))); } }