forked from TrueCloudLab/certificates
Apply suggestions from code review
Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
This commit is contained in:
parent
1880b4b2d0
commit
00cd0f5f21
2 changed files with 2 additions and 2 deletions
|
@ -287,7 +287,7 @@ func (a *Authority) authorizeRenew(cert *x509.Certificate) error {
|
||||||
var ok bool
|
var ok bool
|
||||||
// For backward compatibility this method will also succeed if the
|
// For backward compatibility this method will also succeed if the
|
||||||
// provisioner does not have an extension. LoadByCertificate returns the
|
// provisioner does not have an extension. LoadByCertificate returns the
|
||||||
// noop provisioner if this happens, and it allow certificate renewals.
|
// noop provisioner if this happens, and it allows certificate renewals.
|
||||||
if p, ok = a.provisioners.LoadByCertificate(cert); !ok {
|
if p, ok = a.provisioners.LoadByCertificate(cert); !ok {
|
||||||
return errs.Unauthorized("authority.authorizeRenew: provisioner not found", opts...)
|
return errs.Unauthorized("authority.authorizeRenew: provisioner not found", opts...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ func (a *Authority) unsafeLoadProvisionerFromExtension(crt *x509.Certificate) (p
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Authority) unsafeLoadProvisionerFromDatabase(crt *x509.Certificate) (provisioner.Interface, error) {
|
func (a *Authority) unsafeLoadProvisionerFromDatabase(crt *x509.Certificate) (provisioner.Interface, error) {
|
||||||
// certificateDataGetter is an interface that can be use to retrieve the
|
// certificateDataGetter is an interface that can be used to retrieve the
|
||||||
// provisioner from a db or a linked ca.
|
// provisioner from a db or a linked ca.
|
||||||
type certificateDataGetter interface {
|
type certificateDataGetter interface {
|
||||||
GetCertificateData(string) (*db.CertificateData, error)
|
GetCertificateData(string) (*db.CertificateData, error)
|
||||||
|
|
Loading…
Reference in a new issue