git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #53702 from aanderse/apache-ssl-opt

nixos/httpd: add options sslCiphers & sslProtocols

commit0305c55888b1327e6c0485c8fdea4c738284a781 authorJohn Wiegley <johnw@newartisans.com> dateWed 23 Jan 2019, 19:27 (8 years ago) parent0abf181fd5a886
1 file changed+15−2
nixos/modules/services/web-servers/apache-httpd/default.nix+15−2
nixos/modules/services/web-servers/apache-httpd/default.nix+15−2
@@ -187,8 +187,8 @@ let
187187 SSLRandomSeed startup builtin
188188 SSLRandomSeed connect builtin
189189
190− SSLProtocol All -SSLv2 -SSLv3
191− SSLCipherSuite HIGH:!aNULL:!MD5:!EXP
190+ SSLProtocol ${mainCfg.sslProtocols}
191+ SSLCipherSuite ${mainCfg.sslCiphers}
192192 SSLHonorCipherOrder on
193193 '';
194194
@@ -630,6 +630,19 @@ in
630630 description =
631631 "Maximum number of httpd requests answered per httpd child (prefork), 0 means unlimited";
632632 };
633+
634+ sslCiphers = mkOption {
635+ type = types.str;
636+ default = "HIGH:!aNULL:!MD5:!EXP";
637+ description = "Cipher Suite available for negotiation in SSL proxy handshake.";
638+ };
639+
640+ sslProtocols = mkOption {
641+ type = types.str;
642+ default = "All -SSLv2 -SSLv3";
643+ example = "All -SSLv2 -SSLv3 -TLSv1";
644+ description = "Allowed SSL/TLS protocol versions.";
645+ };
633646 }
634647
635648 # Include the options shared between the main server and virtual hosts.