Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Generate root key
- openssl genrsa -des3 -out CA.key 2048
- # Generate root-certificate based on root-key
- openssl req -x509 -new -nodes -key CA.key -sha256 -days 1825 -out CA.pem \
- -subj "stuff here"
- # Generate Certificate Signing Request (CSR) based on new private key
- openssl req -new -sha256 -nodes -out example.com.csr -newkey rsa:2048 -keyout example.com.key \
- -subj "stuff here"
- # Create certificates for web server
- openssl x509 -req -in example.com.csr -CA CA.pem -CAkey CA.key -CAcreateserial -out example.com.crt -days 1825 -sha256 -extfile v3.ext
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement