Skip to content

Instantly share code, notes, and snippets.

@marekhrabe
marekhrabe / openssl-self-signed-san-certificate.md
Created January 8, 2019 17:14 — forked from jdeathe/openssl-self-signed-san-certificate.md
How to generate a self-signed SAN SSL/TLS certificate using openssl

How to generate a self-signed SAN SSL/TLS certificate using openssl

Generating a self-signed certificate is a common taks and the command to generate one with openssl is well known and well documented. Generating a certificate that includes subjectAltName is not so straght forward however. The following example demonstrates how to generate a SAN certificate without making a permanent change to the openssl configuration.

Generate a list of all required DNS names, (Note: CN will be discarded).

$ export SAN="DNS:www.domain.localdomain,DNS:domain.localdomain"
// Copy Layer List to Clipboard
// Change this variables to configure the script:
var COPY_LAYER_TYPE = true,
TRAVERSE_GROUPS = true,
INDENT_GROUPS = true
var strRepeat = function(str, qty) {
if (qty < 1) return '';
/*
WorkCrew - a WebWorker work queue library
Usage:
// Create an 8 worker pool using worker.js.
var crew = new WorkCrew('worker.js', 8);
// Do something whenever a job is completed.
// The result object structure is