Skip to content

Commit

Permalink
fix: update comment
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Sep 20, 2022
1 parent cd5cadf commit 0af93b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion signature/jws/jws.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func parseProtectedHeaders(encoded string) (*jwsProtectedHeader, error) {
}

// delete attributes that are already defined in jwsProtectedHeader.
for _, headerKey := range knownHeaderKeys {
for _, headerKey := range headerKeys {
delete(protected.ExtendedAttributes, headerKey)
}
return &protected, nil
Expand Down
4 changes: 3 additions & 1 deletion signature/jws/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const (
headerKeyAuthenticSigningTime = "io.cncf.notary.authenticSigningTime"
)

var knownHeaderKeys = []string{
// headerKeys includes all system aware keys for JWS protected header
// [JWS envelope]: https://github.com/notaryproject/notaryproject/blob/main/signature-envelope-jws.md#protected-headers
var headerKeys = []string{
headerKeyAlg,
headerKeyCty,
headerKeyCrit,
Expand Down

0 comments on commit 0af93b2

Please sign in to comment.