Skip to content

Commit 9729c98

Browse files
author
serverco
authored
Merge pull request #256 from tohn/master
Add OCSP Must-Staple
2 parents 44b0c3f + e40b278 commit 9729c98

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

getssl

+8-1
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@
183183
# 2017-01-29 issue #232 use neutral locale for date formatting (2.07)
184184
# 2017-01-30 issue #243 compatibility with bash 3.0 (2.08)
185185
# 2017-01-30 issue #243 additional compatibility with bash 3.0 (2.09)
186+
# 2017-02-18 add OCSP Must-Staple to the domain csr generation (2.10)
186187
# ----------------------------------------------------------------------------------------
187188

188189
PROGNAME=${0##*/}
189-
VERSION="2.09"
190+
VERSION="2.10"
190191

191192
# defaults
192193
ACCOUNT_KEY_LENGTH=4096
@@ -218,6 +219,7 @@ REUSE_PRIVATE_KEY="true"
218219
SERVER_TYPE="https"
219220
SKIP_HTTP_TOKEN_CHECK="false"
220221
SSLCONF="$(openssl version -d 2>/dev/null| cut -d\" -f2)/openssl.cnf"
222+
OCSP_MUST_STAPLE="false"
221223
TEMP_UPGRADE_FILE=""
222224
TOKEN_USER_ID=""
223225
USE_SINGLE_ACL="false"
@@ -620,6 +622,11 @@ create_csr() { # create a csr using a given key (if it doesn't already exist)
620622
tmp_conf=$(mktemp)
621623
cat "$SSLCONF" > "$tmp_conf"
622624
printf "[SAN]\n%s" "$SANLIST" >> "$tmp_conf"
625+
# add OCSP Must-Staple to the domain csr
626+
# if openssl version >= 1.1.0 one can also use "tlsfeature = status_request"
627+
if [[ "$OCSP_MUST_STAPLE" == "true" ]]; then
628+
printf "\n1.3.6.1.5.5.7.1.24 = DER:30:03:02:01:05" >> "$tmp_conf"
629+
fi
623630
openssl req -new -sha256 -key "$csr_key" -subj "$CSR_SUBJECT" -reqexts SAN -config "$tmp_conf" > "$csr_file"
624631
rm -f "$tmp_conf"
625632
fi

0 commit comments

Comments
 (0)