Socket
Socket
Sign inDemoInstall

mozilla-ssl-config-generator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mozilla-ssl-config-generator

Mozilla SSL Configuration Generator


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Mozilla SSL Configuration Generator

The Mozilla SSL Configuration Generator is a tool which builds configuration files to help you follow the Mozilla Server Side TLS configuration guidelines.

Installation

$ npm install

Development

Once you've installed, you can simply run:

$ npm run watch

This starts a local webserver that will automatically reload your changes.

Adding new software

There are two places that need to be updated in order to add support for a new piece of software:

  • src/js/configs.js, which sets the supported features for your software, and
  • src/templates/partials/your-software.hbs, a Handlebars.js template that mirrors your software's configuration

Creating templates

All of the templates are written in Handlebars.js, and so therefore support all of its standard features. This includes if/else/unless conditionals and each loops, for example. In addition, the configuration generator supports the following helpers:

  • eq(item, value) - true if item equals value
  • includes(item, stringOrArray) - true if stringOrArray contains item
  • join(array, joiner) - split a array into a string based on joiner
    • {{{join output.ciphers ":"}}}
  • last(array) - returns the last item in the array
  • minpatchver(minimumver, curver) - true if curver is greater than or equal to minimumver, and both versions are the same patch version, e.g. 2.2
    • {{#if (minpatchver "2.4.3" form.serverVersion)}}
  • minver(minimumver, curver) - true if curver is greater than or equal to minver
    • {{#if (minver "1.9.5" form.serverVersion)}}
  • replace(string, whattoreplace, replacement) - replaces whatToReplace with replacement
    • replace(protocol, "TLSv", "TLS ")
  • reverse(array) - reverses the order of an array
    • {{#each (reverse output.protocols)}
  • sameminorver(version, otherVersion) - returns true if version and otherVersion are of the same minor version, e.g. 2.2
    • {{#if (sameminorver "2.4.0" form.serverVersion)}}
  • split(string, splitter) - split a string into an array based on splitter
    • {{#each (split somearray ":")}}

Building

To publish to GitHub Pages, simply run:

$ npm run build

History

The SSL Config Generator was kept in the mozilla/server-side-tls repository prior to mid 2019 at which point it was moved to this dedicated repository. It was initially created at the end of 2014 and started out supporting Apache HTTP, Nginx and HAProxy.

Authors

License

  • Mozilla Public License Version 2.0

FAQs

Package last updated on 29 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc