From 8dc2064880c964e9ead4fe87abcb43241fa4ee16 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Fri, 13 Jan 2023 17:15:18 +0000 Subject: [PATCH] Option --fix-offset: Adjust off-by-one day The current code calculates --fix-offset=1 as January 2nd. This decreases the input value by one, which results in --fix-offset=1 being January 1st. Signed-off-by: Richard T Bonhomme --- easyrsa3/easyrsa | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index f3c7a89..3e5dcc1 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -3599,6 +3599,9 @@ fixed_cert_dates() { die "Fixed off-set range [1-365 days]: $start_fix_day_n" fi + # Final offset is off-by-one, adjust now + start_fix_day_n="$(( start_fix_day_n - 1 ))" + # Set the end fixed day-number of the Year end_fix_day_n="$(( start_fix_day_n + EASYRSA_CERT_EXPIRE ))"