Merge pull request #125134 from NixOS/backport-124950-to-release-21.05

[Backport release-21.05] nixos/acme: don't use --reuse-key
This commit is contained in:
Martin Weinelt 2021-06-01 01:17:42 +02:00 committed by GitHub
commit 3a2e0c36e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -795,6 +795,16 @@ environment.systemPackages = [
the deprecated <option>services.radicale.config</option> is used. the deprecated <option>services.radicale.config</option> is used.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
In the <option>security.acme</option> module, use of <literal>--reuse-key</literal>
parameter for Lego has been removed. It was introduced for HKPK, but this security
feature is now deprecated. It is a better security practice to rotate key pairs
instead of always keeping the same. If you need to keep this parameter, you can add
it back using <literal>extraLegoRenewFlags</literal> as an option for the
appropriate certificate.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -152,7 +152,7 @@ let
); );
renewOpts = escapeShellArgs ( renewOpts = escapeShellArgs (
commonOpts commonOpts
++ [ "renew" "--reuse-key" ] ++ [ "renew" ]
++ optionals data.ocspMustStaple [ "--must-staple" ] ++ optionals data.ocspMustStaple [ "--must-staple" ]
++ data.extraLegoRenewFlags ++ data.extraLegoRenewFlags
); );