Skip to content

Instantly share code, notes, and snippets.

@pcambra
Last active November 18, 2016 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcambra/d5dddda2a6d59612d4207301e29a598b to your computer and use it in GitHub Desktop.
Save pcambra/d5dddda2a6d59612d4207301e29a598b to your computer and use it in GitHub Desktop.
Generate self signed cert
# —------------ BEGIN custom wildcard.conf —---
oid_section = new_oids
[ new_oids ]
[ req ]
default_days = 3650 # how long to certify for
distinguished_name = req_distinguished_name
encrypt_key = no
string_mask = nombstr
req_extensions = v3_req # Extensions to add to certificate request, needed for multiname
[ req_distinguished_name ]
commonName = Common Name (eg, YOUR name)
commonName_default = *.tida.dev
commonName_max = 64
[ v3_req ]
subjectAltName=DNS:tida.dev,IP:172.19.0.6
# —------------ END custom wildcard.conf —---
# Steps:
# 1. openssl req -x509 -nodes -batch -config wildcard.conf -newkey rsa:2048 -keyout nginx.key -extensions v3_req -out nginx.crt
# 2. openssl x509 -noout -text -in nginx.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment