Skip to content

Commit

Permalink
changed date conversion method for 32 bits architecture (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduez authored and groob committed Dec 19, 2018
1 parent 434638f commit 1e0c4b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions depot/file/depot.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ func (d *fileDepot) HasCN(cn string, allowTime int, cert *x509.Certificate, revo
addDB.WriteString(line + "\n")
// Test & add certificate candidates, if any
} else if strings.HasPrefix(line, "V\t") {
issueDate, err := strconv.Atoi(strings.Replace(strings.Split(line, "\t")[1], "Z", "", 1))
issueDate, err := strconv.ParseInt(strings.Replace(strings.Split(line, "\t")[1], "Z", "", 1), 10, 64)
if err != nil {
return false, errors.New("Could not get expiry date from ca db")
}
minimalRenewDate, err := strconv.Atoi(strings.Replace(makeOpenSSLTime(time.Now().AddDate(0, 0, allowTime).UTC()), "Z", "", 1))
minimalRenewDate, err := strconv.ParseInt(strings.Replace(makeOpenSSLTime(time.Now().AddDate(0, 0, allowTime).UTC()), "Z", "", 1), 10, 64)
if err != nil {
return false, errors.New("Could not calculate expiry date")
}
Expand Down

0 comments on commit 1e0c4b7

Please sign in to comment.