From db92404342f2767fb5da7c67da4d06536156e99c Mon Sep 17 00:00:00 2001 From: verytrap Date: Tue, 9 Apr 2024 17:48:50 +0800 Subject: [PATCH] chore: fix function names in comment Signed-off-by: verytrap --- acme/challenge.go | 4 ++-- acme/common.go | 2 +- acme/order.go | 2 +- api/models/scep.go | 2 +- authority/admin/api/policy.go | 2 +- authority/provisioner/provisioner.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/acme/challenge.go b/acme/challenge.go index 995981ab..9f3ca388 100644 --- a/acme/challenge.go +++ b/acme/challenge.go @@ -726,7 +726,7 @@ var ( oidTCGKpAIKCertificate = asn1.ObjectIdentifier{2, 23, 133, 8, 3} ) -// validateAKCertifiate validates the X.509 AK certificate to be +// validateAKCertificate validates the X.509 AK certificate to be // in accordance with the required properties. The requirements come from: // https://www.w3.org/TR/webauthn-2/#sctn-tpm-cert-requirements. // @@ -735,7 +735,7 @@ var ( // - The Subject Alternative Name extension MUST be set as defined // in [TPMv2-EK-Profile] section 3.2.9. // - The Extended Key Usage extension MUST contain the OID 2.23.133.8.3 -// ("joint-iso-itu-t(2) internationalorganizations(23) 133 tcg-kp(8) tcg-kp-AIKCertificate(3)"). +// ("joint-iso-itu-t(2) international-organizations(23) 133 tcg-kp(8) tcg-kp-AIKCertificate(3)"). // - The Basic Constraints extension MUST have the CA component set to false. // - An Authority Information Access (AIA) extension with entry id-ad-ocsp // and a CRL Distribution Point extension [RFC5280] are both OPTIONAL as diff --git a/acme/common.go b/acme/common.go index e86b23e9..a9a023cd 100644 --- a/acme/common.go +++ b/acme/common.go @@ -130,7 +130,7 @@ func (m *MockProvisioner) GetName() string { return m.Mret1.(string) } -// AuthorizeOrderIdentifiers mock +// AuthorizeOrderIdentifier mock func (m *MockProvisioner) AuthorizeOrderIdentifier(ctx context.Context, identifier provisioner.ACMEIdentifier) error { if m.MauthorizeOrderIdentifier != nil { return m.MauthorizeOrderIdentifier(ctx, identifier) diff --git a/acme/order.go b/acme/order.go index 5a86c2c8..13c16b27 100644 --- a/acme/order.go +++ b/acme/order.go @@ -127,7 +127,7 @@ func (o *Order) UpdateStatus(ctx context.Context, db DB) error { return nil } -// getKeyFingerprint returns a fingerprint from the list of authorizations. This +// getAuthorizationFingerprint returns a fingerprint from the list of authorizations. This // fingerprint is used on the device-attest-01 flow to verify the attestation // certificate public key with the CSR public key. // diff --git a/api/models/scep.go b/api/models/scep.go index f4aa1502..7b3c0793 100644 --- a/api/models/scep.go +++ b/api/models/scep.go @@ -97,7 +97,7 @@ func (s *SCEP) AuthorizeSSHSign(context.Context, string) ([]provisioner.SignOpti return nil, errDummyImplementation } -// AuthorizeRevoke returns an unimplemented error. Provisioners should overwrite +// AuthorizeSSHRevoke returns an unimplemented error. Provisioners should overwrite // this method if they will support authorizing tokens for revoking SSH Certificates. func (s *SCEP) AuthorizeSSHRevoke(context.Context, string) error { return errDummyImplementation diff --git a/authority/admin/api/policy.go b/authority/admin/api/policy.go index 89744893..c45bc947 100644 --- a/authority/admin/api/policy.go +++ b/authority/admin/api/policy.go @@ -35,7 +35,7 @@ type PolicyAdminResponder interface { // policyAdminResponder implements PolicyAdminResponder. type policyAdminResponder struct{} -// NewACMEAdminResponder returns a new PolicyAdminResponder. +// NewPolicyAdminResponder returns a new PolicyAdminResponder. func NewPolicyAdminResponder() PolicyAdminResponder { return &policyAdminResponder{} } diff --git a/authority/provisioner/provisioner.go b/authority/provisioner/provisioner.go index a9b17066..52a06cb7 100644 --- a/authority/provisioner/provisioner.go +++ b/authority/provisioner/provisioner.go @@ -320,7 +320,7 @@ func (b *base) AuthorizeSSHSign(context.Context, string) ([]SignOption, error) { return nil, errs.Unauthorized("provisioner.AuthorizeSSHSign not implemented") } -// AuthorizeRevoke returns an unimplemented error. Provisioners should overwrite +// AuthorizeSSHRevoke returns an unimplemented error. Provisioners should overwrite // this method if they will support authorizing tokens for revoking SSH Certificates. func (b *base) AuthorizeSSHRevoke(context.Context, string) error { return errs.Unauthorized("provisioner.AuthorizeSSHRevoke not implemented")