41 lines
1.4 KiB
C#
41 lines
1.4 KiB
C#
using CertMgr.Core;
|
|
|
|
namespace CertMgr;
|
|
|
|
internal static class Program
|
|
{
|
|
private static async Task<int> Main(string[] args)
|
|
{
|
|
args = [
|
|
"--job=create-certificate",
|
|
"--issuer-certificate=file|o|c:\\friend2.pfx",
|
|
"--issuer-password=aaa",
|
|
"--subject=CN=hello",
|
|
"--san=world",
|
|
"--san=DNS:zdrastvujte",
|
|
"--san=IP:192.168.131.1",
|
|
"--algorithm=ecdsa",
|
|
"--ecdsa-curve=p384",
|
|
"--storage=file|w|c:\\mycert-ecdsa.pfx",
|
|
"--validity-period=2d" ];
|
|
|
|
// args = [
|
|
// "--job=create-certificate",
|
|
// "--issuer-certificate=file|o|c:\\friend2.pfx",
|
|
// "--issuer-password=aaa",
|
|
// "--subject=CN=hello",
|
|
// "--san=world",
|
|
// "--san=DNS:zdrastvujte",
|
|
// "--san=IP:192.168.131.1",
|
|
// "--algorithm=rsa",
|
|
// "--rsa-key-size=2048",
|
|
// "--storage=file|w|c:\\friend-rsa.pfx",
|
|
// "--validity-period=2d" ];
|
|
|
|
using CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
|
|
|
|
JobExecutor executor = new JobExecutor();
|
|
int errorLevel = await executor.ExecuteAsync(args, cts.Token).ConfigureAwait(false);
|
|
return errorLevel;
|
|
}
|
|
} |