Skip to content

Instantly share code, notes, and snippets.

View bestrocker221's full-sized avatar
🎯
Focusing

Carlo Alberto bestrocker221

🎯
Focusing
View GitHub Profile
@bestrocker221
bestrocker221 / gen_rsa_cert.sh
Created April 28, 2018 18:09
generate self-signed rsa certificate (4096)
#!/bin/bash
if [ $# -ne 1 ]; then
echo "usage: <hostname>"
exit 1
fi
CN=$1
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out ${CN}.key
openssl req -new -sha256 -key ${CN}.key -out ${CN}.csr \