From e1ff3c73c4520b92d27412770a5dbcb168b0e5f6 Mon Sep 17 00:00:00 2001 From: rifeplight Date: Sun, 30 Nov 2025 00:24:56 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: rifeplight --- http/tokenV2/authorized_keys_test.go | 2 +- http/tokenV2/middleware_test.go | 2 +- pki/validator.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/http/tokenV2/authorized_keys_test.go b/http/tokenV2/authorized_keys_test.go index a1f1273762..f90aaf39e2 100644 --- a/http/tokenV2/authorized_keys_test.go +++ b/http/tokenV2/authorized_keys_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" ) -// testEmptyAuthorizedKeys ensures an empty authorized_keys file is properly parsed +// TestEmptyAuthorizedKeys ensures an empty authorized_keys file is properly parsed func TestEmptyAuthorizedKeys(t *testing.T) { keys, err := parseAuthorizedKeys([]byte("")) assert.Empty(t, keys) diff --git a/http/tokenV2/middleware_test.go b/http/tokenV2/middleware_test.go index a2316272e3..67d5e30566 100644 --- a/http/tokenV2/middleware_test.go +++ b/http/tokenV2/middleware_test.go @@ -681,7 +681,7 @@ func TestValidJWTECDSAES384(t *testing.T) { assert.NoError(t, err) } -// TestValidJWTECDSAES384 ensures a valid JWT signed by an ECDSA 384-bit key authorizes a request +// TestValidJWTECDSAES512 ensures a valid JWT signed by an ECDSA 512-bit key authorizes a request func TestValidJWTECDSAES512(t *testing.T) { // Generate a new test key and jwt serializer _, serializer, authorizedKey := generateECDSATestKey(t, elliptic.P521(), jwa.ES512) diff --git a/pki/validator.go b/pki/validator.go index 80db1ed633..a771538e59 100644 --- a/pki/validator.go +++ b/pki/validator.go @@ -287,7 +287,7 @@ func (v *validator) getCert(subject string) (*x509.Certificate, bool) { return issuer.(*x509.Certificate), true } -// addEndpoint adds the CRL endpoint if it does not exist. Returns an error if the CRL issuer does not match the expected issuer. +// addEndpoints adds the CRL endpoint if it does not exist. Returns an error if the CRL issuer does not match the expected issuer. func (v *validator) addEndpoints(certIssuer *x509.Certificate, endpoints []string) error { for _, endpoint := range endpoints { if crl, ok := v.getCRL(endpoint); ok {