From 1936deb5336cb9dfceced1deb4cc5a19f6bff54e Mon Sep 17 00:00:00 2001 From: Gene Wood Date: Thu, 28 Jul 2022 14:14:18 -0700 Subject: Add documentation written by gstrauss on template variables Content from https://github.com/mozilla/ssl-config-generator/issues/23#issuecomment-813822976 Fixes #23 --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 0138fd0..61b0077 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,36 @@ All of the templates are written in [Handlebars.js](https://handlebarsjs.com/), - `split(string, splitter)` - split a string into an array based on `splitter` - `{{#each (split somearray ":")}}` +### Template variables + +Highlighted items from src/js/state.js for use in templates. See src/js/state.js for more. + +- `form.serverName` - Server Name +- `form.serverVersion` - Server Version +- `form.opensslVersion` - OpenSSL Version +- `form.config` - configuration name ([ "modern" | "intermediate" | "old" ]) +- `form.hsts` - HTTP Strict Transport Security form checkbox (boolean true/false) +- `form.ocsp` - OCSP Stapling form checkbox (boolean true/false) + +- `output.header` - description of rendered config (`# {{output.header}}`) +- `output.link` - URL to rendered config (`# {{{output.link}}}`) +- `output.protocols` - protocol list (e.g. zero or more of: "TLSv1" "TLSv1.1" "TLSv1.2" "TLSv1.3") +- `output.ciphers` - cipher list (`{{join output.ciphers ":"}}`) +- `output.cipherSuites` - cipher suites list +- `output.serverPreferredOrder` - enforce ServerPreference for ordering cipher list (boolean true/false) +- `output.hstsMaxAge` - max-age (seconds) for Strict-Transport-Security: max-age=... HTTP response header +- `output.permanentRedirect` - HTTP status code ([ 301 | 308 ]) to use for permanent redirect from http://site to https://site + +- `output.latestVersion` - server latest version +- `output.usesOpenssl` - server uses openssl (boolean true/false) +- `output.usesDhe` - server might use Diffie-Hellmann key exchange (boolean true/false) +- `output.dhCommand` - command to generate Diffie-Hellman (DH) parameters +- `output.hasVersions` - server config has versions (boolean true/false) +- `output.supportsConfigs` - supports modern, intermediate, old configs (boolean true/false) +- `output.supportsHsts` - supports HTTP Strict Transport Security (HSTS) (boolean true/false) +- `output.supportsOcspStapling` - supports OCSP Stapling (boolean true/false) +- `output.tls13` - minimum server version supporting TLSv1.3 + ## Building To publish to GitHub Pages, simply run: -- cgit v1.2.3