Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto/acme/autocert: Manager.RenewBefore must be >1hour #36548

Open
leitzler opened this issue Jan 14, 2020 · 1 comment
Open

x/crypto/acme/autocert: Manager.RenewBefore must be >1hour #36548

leitzler opened this issue Jan 14, 2020 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@leitzler
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version go1.13.6 linux/amd64
$ go list -m golang.org/x/crypto
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17

Does this issue reproduce with the latest release?

Yes

What did you do?

Used a Manager with RenewBefore set to 5 minutes (as a part of a test while running my own boulder instance):

m := autocert.Manager{
    // ...
    RenewBefore: time.Minute * 5,
}

What did you expect to see?

I expected that the manager actually used 5 minutes as RenewBefore, since the documentation states:

// RenewBefore optionally specifies how early certificates should
// be renewed before they expire.
//
// If zero, they're renewed 30 days before expiration.
RenewBefore time.Duration

What did you see instead?

RenewBefore being set to 30 days.

There is a check that makes sure that the value specified is more than the renewJitter (1 hour):
https://github.com/golang/crypto/blob/61a87790db17894570dfb32dbaa0a4af9ce60cb4/acme/autocert/autocert.go#L1098

Either it should be allowed to use values less than one hour, or the documentation should reflect that values less than an hour is the same thing as "30 days".

@gopherbot gopherbot added this to the Unreleased milestone Jan 14, 2020
@cagedmantis cagedmantis modified the milestones: Unreleased, Backlog Jan 14, 2020
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 14, 2020
@cagedmantis
Copy link
Contributor

/cc @bradfitz @x1ddos

@FiloSottile FiloSottile modified the milestones: Backlog, Unreleased Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants