Browse Source

caddytls: Remove "IssuerRaw" field

Has been deprecated and printing warnings for about 8 months now.
Replaced by "IssuersRaw" field in v2.3.0.
master
Matthew Holt 4 years ago
parent
commit
81e5318021
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 10
      modules/caddytls/automation.go

10
modules/caddytls/automation.go

@ -89,10 +89,6 @@ type AutomationPolicy struct {
// zerossl. // zerossl.
IssuersRaw []json.RawMessage `json:"issuers,omitempty" caddy:"namespace=tls.issuance inline_key=module"` IssuersRaw []json.RawMessage `json:"issuers,omitempty" caddy:"namespace=tls.issuance inline_key=module"`
// DEPRECATED: Use `issuers` instead (November 2020). This field will
// be removed in the future.
IssuerRaw json.RawMessage `json:"issuer,omitempty" caddy:"namespace=tls.issuance inline_key=module"`
// If true, certificates will be requested with MustStaple. Not all // If true, certificates will be requested with MustStaple. Not all
// CAs support this, and there are potentially serious consequences // CAs support this, and there are potentially serious consequences
// of enabling this feature without proper threat modeling. // of enabling this feature without proper threat modeling.
@ -180,12 +176,6 @@ func (ap *AutomationPolicy) Provision(tlsApp *TLS) error {
} }
} }
// TODO: IssuerRaw field deprecated as of November 2020 - remove this shim after deprecation is complete
if ap.IssuerRaw != nil {
tlsApp.logger.Warn("the 'issuer' field is deprecated and will be removed in the future; use 'issuers' instead; your issuer has been appended automatically for now")
ap.IssuersRaw = append(ap.IssuersRaw, ap.IssuerRaw)
}
// load and provision any explicitly-configured issuer modules // load and provision any explicitly-configured issuer modules
if ap.IssuersRaw != nil { if ap.IssuersRaw != nil {
val, err := tlsApp.ctx.LoadModule(ap, "IssuersRaw") val, err := tlsApp.ctx.LoadModule(ap, "IssuersRaw")

Loading…
Cancel
Save