13 lines
335 B
Bash
Executable File
13 lines
335 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
organization="Example Inc."
|
|
common_name="Example Inc. CA"
|
|
|
|
openssl req -new -x509 -nodes -sha256 -days 3650 \
|
|
-newkey rsa:4096 \
|
|
-keyout ca.key \
|
|
-out ca.crt \
|
|
-subj "/C=US/O=$organization/CN=$common_name" \
|
|
-addext "basicConstraints=critical,CA:TRUE" \
|
|
-addext "keyUsage=critical,keyCertSign,cRLSign"
|