mirror of
https://github.com/go-acme/lego.git
synced 2025-01-27 07:18:15 +02:00
Don't deactivate valid authorizations (#996)
This commit is contained in:
parent
41a9384638
commit
aab54da9a2
@ -61,9 +61,21 @@ func (c *Certifier) getAuthorizations(order acme.ExtendedOrder) ([]acme.Authoriz
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Certifier) deactivateAuthorizations(order acme.ExtendedOrder) {
|
func (c *Certifier) deactivateAuthorizations(order acme.ExtendedOrder) {
|
||||||
for _, auth := range order.Authorizations {
|
for _, authzURL := range order.Authorizations {
|
||||||
if c.core.Authorizations.Deactivate(auth) != nil {
|
auth, err := c.core.Authorizations.Get(authzURL)
|
||||||
log.Infof("Unable to deactivate the authorization: %s", auth)
|
if err != nil {
|
||||||
|
log.Infof("Unable to get the authorization for: %s", authzURL)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if auth.Status == acme.StatusValid {
|
||||||
|
log.Infof("Skipping deactivating of valid auth: %s", authzURL)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Infof("Deactivating auth: %s", authzURL)
|
||||||
|
if c.core.Authorizations.Deactivate(authzURL) != nil {
|
||||||
|
log.Infof("Unable to deactivate the authorization: %s", authzURL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user