Skip to content

Commit

Permalink
chore: remove remaining deprecated ARI call (#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
mocheryl committed May 21, 2024
1 parent d39d57f commit 92bde4c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions acme/api/renewal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package api
import (
"errors"
"net/http"

"github.com/go-acme/lego/v4/acme"
)

// ErrNoARI is returned when the server does not advertise a renewal info endpoint.
Expand All @@ -28,26 +26,3 @@ func (c *CertificateService) GetRenewalInfo(certID string) (*http.Response, erro

return c.core.HTTPClient.Get(c.core.GetDirectory().RenewalInfo + "/" + certID)
}

// UpdateRenewalInfo POSTs updated renewal information for a certificate to the renewalInfo endpoint.
// This is used to indicate that a certificate has been replaced.
//
// Note: this endpoint is part of a draft specification, not all ACME servers will implement it.
// This method will return api.ErrNoARI if the server does not advertise a renewal info endpoint.
//
// https://datatracker.ietf.org/doc/draft-ietf-acme-ari
func (c *CertificateService) UpdateRenewalInfo(req acme.RenewalInfoUpdateRequest) (*http.Response, error) {
if c.core.GetDirectory().RenewalInfo == "" {
return nil, ErrNoARI
}

if req.CertID == "" {
return nil, errors.New("renewalInfo[post]: 'certID' cannot be empty")
}

if !req.Replaced {
return nil, errors.New("renewalInfo[post]: 'replaced' cannot be false")
}

return c.core.post(c.core.GetDirectory().RenewalInfo, req, nil)
}

0 comments on commit 92bde4c

Please sign in to comment.