Skip to content

Commit d5dbf3a

Browse files
committed
refactor: usage
1 parent d5d0a3b commit d5dbf3a

2 files changed

Lines changed: 88 additions & 86 deletions

File tree

README.md

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,50 @@ Usage:
1717
sslcert-compose -c FQDN_CSR_FILE
1818
sslcert-compose -c FQDN_CRT_FILE
1919

20-
Default options:
21-
-o Output directory (default: FQDN/YYYY-MM-DD/)
22-
-l Key bit length (default: 2048)
23-
-d Expiration date of self-signed certificate file (default: 365)
24-
25-
Examples:
26-
Create private key and CSR files:
27-
sslcert-compose -n example.org
28-
29-
Create private key with pass phrase and CSR files:
30-
KEY_PASS_PHRASE=$(read -s -p "KEY_PASS_PHRASE: " KEY_PASS_PHRASE; echo ${KEY_PASS_PHRASE})
31-
sslcert-compose -p "${KEY_PASS_PHRASE}" -n example.org
32-
33-
Create private key and CSR files with a specified request subject:
34-
sslcert-compose -n example.org -s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
35-
36-
Create private key and CSR files in a specific output directory:
37-
sslcert-compose -o /path/to/output/ -n example.org
38-
39-
Create private key and CSR files in a specific output directory with overwrite:
40-
sslcert-compose -o /path/to/output/ -n example.org -f
41-
42-
Create private key, CSR and self-signed CRT files with an expiration date of 3650 days:
43-
sslcert-compose -n example.org
44-
-S -A "*.example.org,example.com" \
45-
-D 3650 \
46-
-s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
47-
48-
Check CSR file:
49-
sslcert-compose -c example.org.csr
50-
51-
Check CRT file:
52-
sslcert-compose -c example.org.crt
53-
54-
Server configuration examples:
55-
Apache:
56-
SSLCertificateFile /path/to/example.org.crt
57-
SSLCertificateKeyFile /path/to/example.org.key
58-
SSLCertificateChainFile /path/to/example.org.ca.crt
59-
60-
nginx:
61-
ssl_certificate /path/to/example.org.crt;
62-
ssl_certificate_key /path/to/example.org.key;
20+
Default options:
21+
-o Output directory (default: FQDN/YYYY-MM-DD/)
22+
-l Key bit length (default: 2048)
23+
-d Expiration date of self-signed certificate file (default: 365)
24+
25+
Examples:
26+
Create private key and CSR files:
27+
sslcert-compose -n example.org
28+
29+
Create private key with pass phrase and CSR files:
30+
KEY_PASS_PHRASE=$(read -s -p "KEY_PASS_PHRASE: " KEY_PASS_PHRASE; echo ${KEY_PASS_PHRASE})
31+
sslcert-compose -p "${KEY_PASS_PHRASE}" -n example.org
32+
33+
Create private key and CSR files with a specified request subject:
34+
sslcert-compose -n example.org \
35+
-s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
36+
37+
Create private key and CSR files in a specific output directory:
38+
sslcert-compose -o /path/to/output/ -n example.org
39+
40+
Create private key and CSR files in a specific output directory with overwrite:
41+
sslcert-compose -o /path/to/output/ -n example.org -f
42+
43+
Create private key, CSR and self-signed CRT files with an expiration date of 3650 days:
44+
sslcert-compose -n example.org
45+
-S -A "*.example.org,example.com" \
46+
-D 3650 \
47+
-s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
48+
49+
Check CSR file:
50+
sslcert-compose -c example.org.csr
51+
52+
Check CRT file:
53+
sslcert-compose -c example.org.crt
54+
55+
Server configuration examples:
56+
Apache:
57+
SSLCertificateFile /path/to/example.org.crt
58+
SSLCertificateKeyFile /path/to/example.org.key
59+
SSLCertificateChainFile /path/to/example.org.ca.crt
60+
61+
nginx:
62+
ssl_certificate /path/to/example.org.crt;
63+
ssl_certificate_key /path/to/example.org.key;
6364
```
6465

6566
## Release tag

sslcert-compose

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -27,49 +27,50 @@ Usage:
2727
$(basename ${0}) -c FQDN_CSR_FILE
2828
$(basename ${0}) -c FQDN_CRT_FILE
2929
30-
Default options:
31-
-o Output directory (default: FQDN/YYYY-MM-DD/)
32-
-l Key bit length (default: 2048)
33-
-d Expiration date of self-signed certificate file (default: 365)
34-
35-
Examples:
36-
Create private key and CSR files:
37-
$(basename ${0}) -n example.org
38-
39-
Create private key with pass phrase and CSR files:
40-
KEY_PASS_PHRASE=\$(read -s -p "KEY_PASS_PHRASE: " KEY_PASS_PHRASE; echo \${KEY_PASS_PHRASE})
41-
$(basename ${0}) -p "\${KEY_PASS_PHRASE}" -n example.org
42-
43-
Create private key and CSR files with a specified request subject:
44-
$(basename ${0}) -n example.org -s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
45-
46-
Create private key and CSR files in a specific output directory:
47-
$(basename ${0}) -o /path/to/output/ -n example.org
48-
49-
Create private key and CSR files in a specific output directory with overwrite:
50-
$(basename ${0}) -o /path/to/output/ -n example.org -f
51-
52-
Create private key, CSR and self-signed CRT files with an expiration date of 3650 days:
53-
$(basename ${0}) -n example.org
54-
-S -A "*.example.org,example.com" \\
55-
-D 3650 \\
56-
-s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
57-
58-
Check CSR file:
59-
$(basename ${0}) -c example.org.csr
60-
61-
Check CRT file:
62-
$(basename ${0}) -c example.org.crt
63-
64-
Server configuration examples:
65-
Apache:
66-
SSLCertificateFile /path/to/example.org.crt
67-
SSLCertificateKeyFile /path/to/example.org.key
68-
SSLCertificateChainFile /path/to/example.org.ca.crt
69-
70-
nginx:
71-
ssl_certificate /path/to/example.org.crt;
72-
ssl_certificate_key /path/to/example.org.key;
30+
Default options:
31+
-o Output directory (default: FQDN/YYYY-MM-DD/)
32+
-l Key bit length (default: 2048)
33+
-d Expiration date of self-signed certificate file (default: 365)
34+
35+
Examples:
36+
Create private key and CSR files:
37+
$(basename ${0}) -n example.org
38+
39+
Create private key with pass phrase and CSR files:
40+
KEY_PASS_PHRASE=\$(read -s -p "KEY_PASS_PHRASE: " KEY_PASS_PHRASE; echo \${KEY_PASS_PHRASE})
41+
$(basename ${0}) -p "\${KEY_PASS_PHRASE}" -n example.org
42+
43+
Create private key and CSR files with a specified request subject:
44+
$(basename ${0}) -n example.org \\
45+
-s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
46+
47+
Create private key and CSR files in a specific output directory:
48+
$(basename ${0}) -o /path/to/output/ -n example.org
49+
50+
Create private key and CSR files in a specific output directory with overwrite:
51+
$(basename ${0}) -o /path/to/output/ -n example.org -f
52+
53+
Create private key, CSR and self-signed CRT files with an expiration date of 3650 days:
54+
$(basename ${0}) -n example.org
55+
-S -A "*.example.org,example.com" \\
56+
-D 3650 \\
57+
-s "/C=JP/ST=Tokyo/L=Shinjuku-ku/O=Example Corporation/OU=Example Group/CN=example.org/emailAddress=ssladmin@example.org"
58+
59+
Check CSR file:
60+
$(basename ${0}) -c example.org.csr
61+
62+
Check CRT file:
63+
$(basename ${0}) -c example.org.crt
64+
65+
Server configuration examples:
66+
Apache:
67+
SSLCertificateFile /path/to/example.org.crt
68+
SSLCertificateKeyFile /path/to/example.org.key
69+
SSLCertificateChainFile /path/to/example.org.ca.crt
70+
71+
nginx:
72+
ssl_certificate /path/to/example.org.crt;
73+
ssl_certificate_key /path/to/example.org.key;
7374
_EOF_
7475
}
7576

0 commit comments

Comments
 (0)