Skip to content

Instantly share code, notes, and snippets.

@sindarina
sindarina / generate-self-signed-certificate.sh
Created October 11, 2017 18:17
Generate a self-signed certificate, with SAN override
#!/bin/bash
#
# Generates a proper non-CA self-signed certificate for testing, default
# server stanzas, and so on. Based on Heroku tutorial here;
#
# https://devcenter.heroku.com/articles/ssl-certificate-self
#
# Single use only; generates a time-stamped server certificate, removes
# the root and CSR afterwards.
#