mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-05-12 04:57:50 +00:00
linter complains about this, I'll just fix it
This commit is contained in:
parent
e34d5275d6
commit
2f4beb57ba
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ func (c *AcmeClient) retrieveCertFromDB(sni, mainDomainSuffix string, useDnsProv
|
||||||
// renew certificates 7 days before they expire
|
// renew certificates 7 days before they expire
|
||||||
if tlsCertificate.Leaf.NotAfter.Before(time.Now().Add(7 * 24 * time.Hour)) {
|
if tlsCertificate.Leaf.NotAfter.Before(time.Now().Add(7 * 24 * time.Hour)) {
|
||||||
// TODO: use ValidTill of custom cert struct
|
// TODO: use ValidTill of custom cert struct
|
||||||
if res.CSR != nil && len(res.CSR) > 0 {
|
if len(res.CSR) > 0 {
|
||||||
// CSR stores the time when the renewal shall be tried again
|
// CSR stores the time when the renewal shall be tried again
|
||||||
nextTryUnix, err := strconv.ParseInt(string(res.CSR), 10, 64)
|
nextTryUnix, err := strconv.ParseInt(string(res.CSR), 10, 64)
|
||||||
if err == nil && time.Now().Before(time.Unix(nextTryUnix, 0)) {
|
if err == nil && time.Now().Before(time.Unix(nextTryUnix, 0)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue