Default SAN for serverClient, additional op_test

Signed-off-by: Richard Bonhomme <tincanteksup@gmail.com>
This commit is contained in:
Richard Bonhomme 2019-06-10 20:13:59 +01:00
parent 1fa5003081
commit 713f1d633e
No known key found for this signature in database
GPG Key ID: D7D49FA009D95091
2 changed files with 14 additions and 2 deletions

View File

@ -849,7 +849,7 @@ $(display_dn req "$req_in")
# If type is server and no subjectAltName was requested,
# add one to the extensions file
if [ "$crt_type" = 'server' ];
if [ "$crt_type" = 'server' -o "$crt_type" = 'serverClient' ];
then
echo "$EASYRSA_EXTRA_EXTS" |
grep -q subjectAltName ||

View File

@ -372,7 +372,7 @@ build_full ()
build_san_full ()
{
newline 1
STEP_NAME="--subject-alt-name=DNS:www.example.org,IP:0.0.0.0 build-server-full $REQ_name nopass"
STEP_NAME="--subject-alt-name=DNS:www.example.org,IP:0.0.0.0 build-$REQ_type-full $REQ_name nopass"
action
secure_key
}
@ -491,6 +491,18 @@ create_pki ()
REQ_name="s03"
build_full
show_cert
wait_sec 3
renew_cert
show_cert
revoke_cert
REQ_type="serverClient"
REQ_name="s04"
build_san_full
show_cert
wait_sec 3
renew_cert
show_cert
revoke_cert
REQ_type="client"