DANE Support
-
Hello,
While testing the current Let's Encrypt PowerShell script included with MDaemon (v2.0.16), I noticed that a new certificate key pair is generated during every renewal:
if(Test-Path $CertKeyPath) { Log "Removing the existing $CertKeyPath file from disk." Remove-Item -Path $CertKeyPath -Force } if($ECDSA){ $global:CertKey = New-ACMECertificateKey -Path $CertKeyPath -ECDsa } else { $global:CertKey = New-ACMECertificateKey -Path $CertKeyPath -RSA }This behavior works well for standard certificate renewals, but it creates a challenge for administrators who deploy DANE (DNS-based Authentication of Named Entities) with TLSA records based on the certificate's public key (for example, TLSA usage 3 selector 1 matching type 1).
Because a new key pair is generated during every renewal, the TLSA record becomes invalid after each certificate renewal and must be updated manually. If the administrator forgets to update the TLSA record, DANE validation will fail.
I tested a modified version of the script that reuses the existing certificate key when present:
if (Test-Path $CertKeyPath) { Log "Reusing existing certificate key from $CertKeyPath" $global:CertKey = Import-ACMECertificateKey -Path $CertKeyPath } else { Log "No existing key found → generating new certificate key" if($ECDSA){ $global:CertKey = New-ACMECertificateKey -Path $CertKeyPath -ECDsa } else { $global:CertKey = New-ACMECertificateKey -Path $CertKeyPath -RSA } }After testing, certificate renewals completed successfully, the public key remained unchanged, and existing TLSA records continued to validate correctly.
Would it be possible to add an optional setting such as:
"Reuse existing Let's Encrypt certificate key during renewal"
or a similar GUI option?
This would make DANE deployments much easier to maintain while preserving the current behavior as the default for administrators who prefer automatic key rotation.
Thank you for considering the suggestion.
-
-
-
-
-