Skip to content

Commit 8670ee4

Browse files
committed
Backport patch for #559 to 3.0
Backport the patch from a4e37cf to 3.0 that fixes the data arguments on Darwin and BSD. Patch originally authored by @TinCanTech. Update .gitignore to ignore macOS .DS_Store files. Update ChangeLog for v3.0.9 release Signed-off-by: Eric F Crist <[email protected]>
1 parent 6b803b5 commit 8670ee4

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ dist-staging
66
easyrsa3/safessl-easyrsa.cnf
77
testdeps/*
88
shellcheck
9+
.DS_Store

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Easy-RSA 3 ChangeLog
2121
* Warnings are no longer silenced by --batch (#523)
2222
* Improve packaging options (#510)
2323
* Update regex for POSIX compliance (#556)
24+
* Correct date format for Darwin/BSD (#559)
2425

2526
3.0.8 (2020-09-09)
2627
* Provide --version option (#372)

easyrsa3/easyrsa

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,9 @@ Non-decimal value for EASYRSA_FIX_OFFSET: '$EASYRSA_FIX_OFFSET'"
16351635
allow_renew_date="$(( now_sec + EASYRSA_CERT_RENEW * 86400 ))"
16361636

16371637
if [ "$EASYRSA_FIX_OFFSET" ]; then
1638-
start_fix_sec="$(date -j "${this_year}01010000.00" +%s)"
1638+
start_fix_sec="$(
1639+
date -j -f '%Y%m%d%H%M%S' "${this_year}0101000000" +%s
1640+
)"
16391641
end_fix_sec="$(( start_fix_sec + fix_days * 86400 ))"
16401642
# Convert to date-stamps for SSL input
16411643
start_fixdate="$(date -j -r "$start_fix_sec" +%Y%m%d%H%M%SZ)"

0 commit comments

Comments
 (0)