func (fn CertificateEnforcerFunc) Enforce(cert *x509.Certificate) error {
	return fn(cert)
}
Enforce implements CertificateEnforcer and just calls the defined function.
package provisioner
import (
	"crypto/ecdsa"
	"crypto/ed25519"
	"crypto/rsa"
	"crypto/x509"
	"crypto/x509/pkix"
	"encoding/asn1"
	"encoding/json"
	"net"
	"net/url"
	"reflect"
	"time"
	"github.com/pkg/errors"
	"go.step.sm/crypto/x509util"
)
const DefaultCertValidity = 24 * time.Hour
type SignOptions struct {
	NotAfter     TimeDuration    `json:"notAfter"`
	NotBefore    TimeDuration    `json:"notBefore"`
	TemplateData json.RawMessage `json:"templateData"`
	Backdate     time.Duration   `json:"-"`
}
type SignOption interface{}
type CertificateValidator interface {
	Valid(cert *x509.Certificate, opts SignOptions) error
}
type CertificateRequestValidator interface {
	Valid(cr *x509.CertificateRequest) error
}
type CertificateModifier interface {
	Modify(cert *x509.Certificate, opts SignOptions) error
}
type CertificateEnforcer interface {
	Enforce(cert *x509.Certificate) error
}
type CertificateModifierFunc func(cert *x509.Certificate, opts SignOptions) error
func (fn CertificateModifierFunc) Modify(cert *x509.Certificate, opts SignOptions) error {
	return fn(cert, opts)
}
type CertificateEnforcerFunc func(cert *x509.Certificate) error