blob: 7597206d3f41e4c8e3127cc4d9fe61b4a1f77772 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
using Fclp;
using PKISharp.WACS.Plugins.TargetPlugins;
namespace PKISharp.WACS.Configuration
{
internal class MainArgumentsProvider : BaseArgumentsProvider<MainArguments>
{
public override string Name => "Main";
public override string Group => "";
public override string Condition => "";
protected override bool IsActive(MainArguments current)
{
return
!string.IsNullOrEmpty(current.FriendlyName) ||
!string.IsNullOrEmpty(current.Installation) ||
!string.IsNullOrEmpty(current.Store) ||
!string.IsNullOrEmpty(current.Order) ||
!string.IsNullOrEmpty(current.Csr) ||
!string.IsNullOrEmpty(current.Target) ||
!string.IsNullOrEmpty(current.Validation);
}
public override void Configure(FluentCommandLineParser<MainArguments> parser)
{
// Basic options
parser.Setup(o => o.BaseUri)
.As("baseuri")
.WithDescription("Address of the ACMEv2 server to use. The default endpoint can be modified in settings.json.");
parser.Setup(o => o.Import)
.As("import")
.WithDescription("Import scheduled renewals from version 1.9.x in unattended mode.");
parser.Setup(o => o.ImportBaseUri)
.As("importbaseuri")
.WithDescription("[--import] When importing scheduled renewals from version 1.9.x, this argument can change the address of the ACMEv1 server to import from. The default endpoint to import from can be modified in settings.json.");
parser.Setup(o => o.Test)
.As("test")
.WithDescription("Enables testing behaviours in the program which may help with troubleshooting. By default this also switches the --baseuri to the ACME test endpoint. The default endpoint for test mode can be modified in settings.json.");
parser.Setup(o => o.Verbose)
.As("verbose")
.WithDescription("Print additional log messages to console for troubleshooting and bug reports.");
parser.Setup(o => o.Help)
.As('?', "help")
.WithDescription("Show information about all available command line options.");
parser.Setup(o => o.Version)
.As("version")
.WithDescription("Show version information.");
// Renewal
parser.Setup(o => o.Renew)
.As("renew")
.WithDescription("Renew any certificates that are due. This argument is used by the scheduled task. Note that it's not possible to change certificate properties and renew at the same time.");
parser.Setup(o => o.Force)
.As("force")
.WithDescription("Force renewal when used together with --renew. Otherwise bypasses the certificate cache on new certificate requests.");
// Commands
parser.Setup(o => o.Cancel)
.As("cancel")
.WithDescription("Cancel renewal specified by the --friendlyname or --id arguments.");
parser.Setup(o => o.Revoke)
.As("revoke")
.WithDescription("Revoke the most recently issued certificate for the renewal specified by the --friendlyname or --id arguments.");
parser.Setup(o => o.List)
.As("list")
.WithDescription("List all created renewals in unattended mode.");
// Targeting
parser.Setup(o => o.Id)
.As("id")
.WithDescription("[--target|--cancel|--renew|--revoke] Id of a new or existing renewal, can be used to override the default when creating a new renewal or to specify a specific renewal for other commands.");
parser.Setup(o => o.FriendlyName)
.As("friendlyname")
.WithDescription("[--target|--cancel|--renew|--revoke] Friendly name of a new or existing renewal, can be used to override the default when creating a new renewal or to specify a specific renewal for other commands. In the latter case a pattern might be used. " + IISArgumentsProvider.PatternExamples);
// Plugins (unattended)
parser.Setup(o => o.Target)
.As("target")
.WithDescription("Specify which target plugin to run, bypassing the main menu and triggering unattended mode.");
parser.Setup(o => o.Validation)
.As("validation")
.WithDescription("Specify which validation plugin to run. If none is specified, SelfHosting validation will be chosen as the default.");
parser.Setup(o => o.ValidationMode)
.As("validationmode")
.SetDefault(Constants.Http01ChallengeType)
.WithDescription("Specify which validation mode to use. HTTP-01 is the default.");
parser.Setup(o => o.Order)
.As("order")
.WithDescription("Specify which order plugin to use. Single is the default.");
parser.Setup(o => o.Csr)
.As("csr")
.WithDescription("Specify which CSR plugin to use. RSA is the default.");
parser.Setup(o => o.Store)
.As("store")
.WithDescription("Specify which store plugin to use. CertificateStore is the default. This may be a comma separated list.");
parser.Setup(o => o.Installation)
.As("installation")
.WithDescription("Specify which installation plugins to use. IIS is the default. This may be a comma separated list.");
// Misc
parser.Setup(o => o.CloseOnFinish)
.As("closeonfinish")
.WithDescription("[--test] Close the application when complete, which usually does not happen when test mode is active. Useful to test unattended operation.");
parser.Setup(o => o.HideHttps)
.As("hidehttps")
.WithDescription("Hide sites that have existing https bindings from interactive mode.");
parser.Setup(o => o.NoTaskScheduler)
.As("notaskscheduler")
.WithDescription("Do not create (or offer to update) the scheduled task.");
parser.Setup(o => o.UseDefaultTaskUser)
.As("usedefaulttaskuser")
.WithDescription("(Obsolete) Avoid the question about specifying the task scheduler user, as such defaulting to the SYSTEM account.");
parser.Setup(o => o.Encrypt)
.As("encrypt")
.WithDescription("Rewrites all renewal information using current EncryptConfig setting");
}
}
}
|