File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,14 @@ func (ari RenewalInfo) HasWindow() bool {
110110 return ! ari .SuggestedWindow .Start .IsZero () && ! ari .SuggestedWindow .End .IsZero ()
111111}
112112
113+ // SameWindow returns true if this ARI has the same window as the ARI passed in.
114+ // Note that suggested windows can move in either direction, expand, or contract,
115+ // so this method compares both start and end values for exact equality.
116+ func (ari RenewalInfo ) SameWindow (other RenewalInfo ) bool {
117+ return ari .SuggestedWindow .Start .Equal (other .SuggestedWindow .Start ) &&
118+ ari .SuggestedWindow .End .Equal (other .SuggestedWindow .End )
119+ }
120+
113121// GetRenewalInfo returns the ACME Renewal Information (ARI) for the certificate.
114122// It fills in the Retry-After value, if present, onto the returned struct so
115123// the caller can poll appropriately. If the ACME server does not support ARI,
You can’t perform that action at this time.
0 commit comments