Skip to content

Commit

Permalink
Fix, add 1 hour when showing the next date
Browse files Browse the repository at this point in the history
Fix, add 1 hour when showing the next date you could issue a cert when hitting the rate limit. This is because Let's Encrypt always issue the certificates using 1 hour less than real time but Let's Encrypt keeps the real time in their DB to remove expired limits (v0.13)
  • Loading branch information
sahsanu committed Feb 15, 2018
1 parent 92bbc5a commit e18dfda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lectl
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ if [ $maxnumberofcerts -ge $ratelimit ]; then
remaining=$((${ratelimit}-count))
if [ $remaining -le 0 ];then
lastcert=$(echo -e "${dentrode}" | $_tail -n1 )
next=$($_date ${utc} -d "${lastcert}+7 days 1 minute" +'%A %Y-%b-%d %H:%M:%S %Z')
next=$($_date ${utc} -d "${lastcert}+7 days 1 hour 1 minute" +'%A %Y-%b-%d %H:%M:%S %Z')
if [ -z "${extraline}" ];then echo " ";fi
echo "Sorry, you can't issue any certificate, you already issued $count certificate$(_plural $count) on last 7 days"
echo "You could issue next certificate on $next"
Expand Down

0 comments on commit e18dfda

Please sign in to comment.