Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sid inputs #7

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ private async Task<int> CreateCertAsync(GenerateArgModel values)
ekus,
values.KeyLength,
"",
values.KeyProvider
values.KeyProvider,
""
);
if (values.RDPCert)
{
Expand Down Expand Up @@ -285,7 +286,8 @@ private async Task<int> CreateDCCertAsync(CreateDCCertificate values)
values.EKUs,
values.KeyLength,
values.DCGUID,
values.KeyProvider
values.KeyProvider,
values.sid
);
}
catch (Exception ex)
Expand Down Expand Up @@ -436,7 +438,8 @@ private async Task<X509Certificate2> CreateCertificateAsync(
List<string> ekus,
int keyLength,
string dcGUID = "",
string keyProvider = "Microsoft Enhanced Cryptographic Provider v1.0"
string keyProvider = "Microsoft Enhanced Cryptographic Provider v1.0",
string sid = ""
)
{
if (_logger == null)
Expand Down Expand Up @@ -483,7 +486,8 @@ private async Task<X509Certificate2> CreateCertificateAsync(
domain,
validity,
ekus,
dcGUID
dcGUID,
sid
XavierJCallait marked this conversation as resolved.
Show resolved Hide resolved
);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public class CreateDCCertificate

[Option('k', "KeyLength", HelpText = "Certificate Key Length", Default = 4096)]
public int KeyLength { get; set; } = 4096;

[Option("sid", Required = false, HelpText = "SID for the certificate to be created")]
public string sid { get; set; } = "";

[Option(
'p',
"KeyProvider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public class GenerateArgModel

[Option('k', "KeyLength", HelpText = "Certificate Key Length", Default = 4096)]
public int KeyLength { get; set; } = 4096;

[Option(
'p',
"KeyProvider",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class RenewArgModel
)]
public string issuer { get; set; } = "";
[Option('k', "KeyLength", HelpText = "Certificate Key Length", Default = 4096)]

public int KeyLength { get; set; } = 4096;
[Option(
'p',
Expand Down