Skip to content

Instantly share code, notes, and snippets.

@artyomb
artyomb / make_ca.sh
Last active April 27, 2018 16:00
SSL Certificate make Simple (openssl only)
#!/bin/bash
cd "$(dirname "$0")"
#Generage CA (self-signed)
openssl req -x509 -nodes -days 5000 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
#Debug dump
openssl x509 -in ca.crt -noout -text >ca.txt
openssl x509 -noout -fingerprint -in ca.crt >> ca.txt