forked from TrueCloudLab/certificates
Remove unused function LoadProvisionerByID from SCEP
This commit is contained in:
parent
ad041d6bb7
commit
5f42ae0bce
1 changed files with 1 additions and 13 deletions
|
@ -21,7 +21,6 @@ import (
|
||||||
// Interface is the SCEP authority interface.
|
// Interface is the SCEP authority interface.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
LoadProvisionerByName(string) (provisioner.Interface, error)
|
LoadProvisionerByName(string) (provisioner.Interface, error)
|
||||||
LoadProvisionerByID(string) (provisioner.Interface, error)
|
|
||||||
GetLinkExplicit(provName string, absoluteLink bool, baseURL *url.URL, inputs ...string) string
|
GetLinkExplicit(provName string, absoluteLink bool, baseURL *url.URL, inputs ...string) string
|
||||||
|
|
||||||
GetCACertificates(ctx context.Context) ([]*x509.Certificate, error)
|
GetCACertificates(ctx context.Context) ([]*x509.Certificate, error)
|
||||||
|
@ -58,7 +57,6 @@ type AuthorityOptions struct {
|
||||||
// SignAuthority is the interface for a signing authority
|
// SignAuthority is the interface for a signing authority
|
||||||
type SignAuthority interface {
|
type SignAuthority interface {
|
||||||
Sign(cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error)
|
Sign(cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error)
|
||||||
LoadProvisionerByID(string) (provisioner.Interface, error)
|
|
||||||
LoadProvisionerByName(string) (provisioner.Interface, error)
|
LoadProvisionerByName(string) (provisioner.Interface, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,12 +95,6 @@ var (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// LoadProvisionerByID calls out to the SignAuthority interface to load a
|
|
||||||
// provisioner by ID.
|
|
||||||
func (a *Authority) LoadProvisionerByID(id string) (provisioner.Interface, error) {
|
|
||||||
return a.signAuth.LoadProvisionerByID(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
// LoadProvisionerByName calls out to the SignAuthority interface to load a
|
// LoadProvisionerByName calls out to the SignAuthority interface to load a
|
||||||
// provisioner by name.
|
// provisioner by name.
|
||||||
func (a *Authority) LoadProvisionerByName(name string) (provisioner.Interface, error) {
|
func (a *Authority) LoadProvisionerByName(name string) (provisioner.Interface, error) {
|
||||||
|
@ -285,11 +277,7 @@ func (a *Authority) SignCSR(ctx context.Context, csr *x509.CertificateRequest, m
|
||||||
return nil, errors.Wrap(err, "error retrieving authorization options from SCEP provisioner")
|
return nil, errors.Wrap(err, "error retrieving authorization options from SCEP provisioner")
|
||||||
}
|
}
|
||||||
|
|
||||||
opts := provisioner.SignOptions{
|
opts := provisioner.SignOptions{}
|
||||||
// NotBefore: provisioner.NewTimeDuration(o.NotBefore),
|
|
||||||
// NotAfter: provisioner.NewTimeDuration(o.NotAfter),
|
|
||||||
}
|
|
||||||
|
|
||||||
templateOptions, err := provisioner.TemplateOptions(p.GetOptions(), data)
|
templateOptions, err := provisioner.TemplateOptions(p.GetOptions(), data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "error creating template options from SCEP provisioner")
|
return nil, errors.Wrap(err, "error creating template options from SCEP provisioner")
|
||||||
|
|
Loading…
Reference in a new issue