Skip to content

Commit 8ac7c3c

Browse files
committed
Merge branch 'TinCanTech-check-start-end-date'
Signed-off-by: Richard T Bonhomme <[email protected]>
2 parents 25f908c + 1d6ee9b commit 8ac7c3c

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Easy-RSA 3 ChangeLog
22

33
3.2.4 (TBD)
44

5+
* mutual_exclusions(): Include basic checks for --startdate/--enddate (e1478c3) (#1372)
56
* Windows easyrsa-shell-init.sh: Replace 'read -p' (49b2181) (#1371)
67
* inline: Include missing OpenVPN TLS key to cause INCOMPLETE warning (d98eee6) (#1368)
78
* Verbose: Make verbose messages command and function aware (7634b94) (#1368)

easyrsa3/easyrsa

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Certificate & Request options: (these impact cert/req field values)
5656
--notext|no-text: Create certificates without human readable text
5757
--days=# : Sets the signing validity to the specified number of days
5858
Applies to other commands. For details, see: 'help days'
59-
--startdate=DATE: Sets the SSL option '-startdate' (Format 'YYYYMMDDhhmmssZ')
60-
--enddate=DATE : Sets the SSL option '-enddate' (Format 'YYYYMMDDhhmmssZ')
59+
--startdate=DATE: Sets the SSL option '-startdate' (Format '[YY]YYMMDDhhmmssZ')
60+
--enddate=DATE : Sets the SSL option '-enddate' (Format '[YY]YYMMDDhhmmssZ')
6161

6262
--digest=ALG : Digest to use in the requests & certificates
6363
--keysize=# : Size in bits of keypair to generate (RSA Only)
@@ -5446,6 +5446,19 @@ Option --silent-ssl requires batch mode --batch."
54465446
Use of --startdate requires use of --enddate."
54475447
fi
54485448

5449+
# Basic --startdate/--enddate check
5450+
case "${#EASYRSA_START_DATE}" in
5451+
0|13|15) : ;; # ok
5452+
*) user_error "\
5453+
Format of --startdate/--enddate must be [YY]YYMMDDhhmmssZ"
5454+
esac
5455+
5456+
case "${#EASYRSA_END_DATE}" in
5457+
0|13|15) : ;; # ok
5458+
*) user_error "\
5459+
Format of --startdate/--enddate must be [YY]YYMMDDhhmmssZ"
5460+
esac
5461+
54495462
# --enddate may over-rule EASYRSA_CERT_EXPIRE
54505463
if [ "$EASYRSA_END_DATE" ]; then
54515464
case "$cmd" in

0 commit comments

Comments
 (0)