Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
satorunooshie committed Jul 19, 2022
1 parent 6f1e140 commit 51945e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions key_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type verifiedKey struct {
}

// KeyProvider implements jws.KeyProvider.
// Once pubkey verified,
// Once pubkey verified, it's cached.
type KeyProvider struct {
trusted verifiedKey
fetcher RootCAFetcher
Expand All @@ -30,7 +30,7 @@ func NewKeyProvider(fetcher RootCAFetcher) *KeyProvider {
}
}

// FetchKeys extracts the public key from the y5c field to verify the certificate according to https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.6.
// FetchKeys extracts the public key from the x5c field to verify the certificate according to https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.6.
// Treat the chain that matches the root certificate fetched by RootCAFetcher as the root certificate.
func (p *KeyProvider) FetchKeys(ctx context.Context, sink jws.KeySink, sig *jws.Signature, msg *jws.Message) error {
headers := sig.ProtectedHeaders()
Expand Down

0 comments on commit 51945e6

Please sign in to comment.