Fix to always default to RSA key type in Let's Encrypt

This commit is contained in:
iliajie
2023-02-23 20:50:33 +02:00
parent 395d7d261d
commit c3fa84a7cd

View File

@@ -165,9 +165,13 @@ if ($letsencrypt_cmd) {
my $dir = $letsencrypt_cmd;
my $cmd_ver = &get_certbot_major_version($letsencrypt_cmd);
my $old_flags;
my $new_flags;
if ($cmd_ver < 1.11) {
$old_flags = " --manual-public-ip-logging-ok";
}
if ($cmd_ver >= 2) {
$new_flags = " --key-type rsa";
}
$dir =~ s/\/[^\/]+$//;
$size ||= 2048;
my $out;
@@ -185,6 +189,7 @@ if ($letsencrypt_cmd) {
" --non-interactive".
" --agree-tos".
" --config ".quotemeta($temp)."".
"$new_flags".
" --rsa-key-size $size".
" --cert-name ".quotemeta($doms[0]).
($staging ? " --test-cert" : "").
@@ -207,6 +212,7 @@ if ($letsencrypt_cmd) {
" --non-interactive".
" --agree-tos".
" --config ".quotemeta($temp)."".
"$new_flags".
" --rsa-key-size $size".
" --cert-name ".quotemeta($doms[0]).
($staging ? " --test-cert" : "").