···11+{ lib }:
22+{
33+ tlsRecommendationsOption = lib.mkOption {
44+ type = lib.types.nullOr (
55+ lib.types.enum [
66+ "modern"
77+ "intermediate"
88+ "old"
99+ ]
1010+ );
1111+ default = null;
1212+ example = "intermediate";
1313+ description = ''
1414+ By default, H2O, without prejudice, will use as many TLS versions &
1515+ cipher suites as it & the TLS library (OpenSSL) can support. The user is
1616+ expected to hone settings for the security of their server. Setting some
1717+ constraints is recommended, & if unsure about what TLS settings to use,
1818+ this option gives curated TLS settings recommendations from Mozilla’s
1919+ ‘SSL Configuration Generator’ project (see
2020+ <https://ssl-config.mozilla.org>) or read more at Mozilla’s Wiki (see
2121+ <https://wiki.mozilla.org/Security/Server_Side_TLS>).
2222+2323+ modern
2424+ : Services with clients that support TLS 1.3 & don’t need backward
2525+ compatibility
2626+2727+ intermediate
2828+ : General-purpose servers with a variety of clients, recommended for
2929+ almost all systems
3030+3131+ old
3232+ : Compatible with a number of very old clients, & should be used only as
3333+ a last resort
3434+3535+ The default for all virtual hosts can be set with
3636+ services.h2o.defaultTLSRecommendations, but this value can be overridden
3737+ on a per-host basis using services.h2o.hosts.<name>.tls.recommmendations.
3838+ The settings will also be overidden by manual values set with
3939+ services.settings.h2o.hosts.<name>.tls.extraSettings.
4040+4141+ NOTE: older/weaker ciphers might require overriding the OpenSSL version
4242+ of H2O (such as `openssl_legacy`). This can be done with
4343+ sevices.settings.h2o.package.
4444+ '';
4545+ };
4646+}