maehr/typademic

View on GitHub
generate_ssl.sh

Summary

Maintainability
Test Coverage
#!/bin/bash
if [ -f key.pem ] && [ -f crt.pem ]; then
    echo a key and a cert file already exists
else
    openssl req -new -newkey rsa:4096 -days 1825 -nodes -x509 \
    -subj "/C=CH/ST=Denial/L=Zurich/O=Dis/CN=www.example.com" \
    -keyout ./key.pem  -out ./crt.pem
fi