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

Variable KeySize #295

Merged
merged 5 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 2 additions & 1 deletion src/LettuceEncrypt/Internal/AcmeCertificateFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ private async Task<X509Certificate2> CompleteCertificateRequestAsync(IOrderConte
{
CommonName = commonName,
};
var privateKey = KeyFactory.NewKey((Certes.KeyAlgorithm)_options.Value.KeyAlgorithm);
var privateKeyAlgorithm = (Certes.KeyAlgorithm)_options.Value.KeyAlgorithm;
var privateKey = KeyFactory.NewKey(privateKeyAlgorithm, _options.Value.KeySize);
var acmeCert = await _client.GetCertificateAsync(csrInfo, privateKey, order);

_logger.LogAcmeAction("NewCertificate");
Expand Down
5 changes: 5 additions & 0 deletions src/LettuceEncrypt/LettuceEncryptOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public bool UseStagingServer
/// The asymmetric algorithm used for generating a private key for certificates: RS256, ES256, ES384, ES512
/// </summary>
public KeyAlgorithm KeyAlgorithm { get; set; } = KeyAlgorithm.ES256;

/// <summary>
/// The key size used for generating a private key for certificates
/// </summary>
public int? KeySize { get; set; }

/// <summary>
/// Specifies which kinds of ACME challenges LettuceEncrypt can use to verify domain ownership.
Expand Down
Loading