Skip to content

Commit

Permalink
refactor: refactor comments
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin Li <libinbin@microsoft.com>
  • Loading branch information
binbin-li committed Sep 21, 2022
1 parent f14510c commit a0304ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion signature/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (e *InvalidArgumentError) Error() string {
return fmt.Sprintf("%q param is invalid", e.Param)
}

// Unwrap returns the unwrapped error
// Unwrap returns the unwrapped error.
func (e *InvalidArgumentError) Unwrap() error {
return e.Err
}
Expand Down
2 changes: 1 addition & 1 deletion signature/jws/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type signingMethod interface {
PrivateKey() crypto.PrivateKey
}

// remoteSigningMethod wraps the remote signer to be a SigningMethod
// remoteSigningMethod wraps the remote signer to be a SigningMethod.
type remoteSigningMethod struct {
signer signature.Signer
certs []*x509.Certificate
Expand Down
8 changes: 5 additions & 3 deletions signature/jws/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ type jwsProtectedHeader struct {
// Specifies the Notary v2 Signing Scheme used by the signature.
SigningScheme signature.SigningScheme `json:"io.cncf.notary.signingScheme"`

// The time at which the signature was generated. only valid when signing scheme is `notary.x509`
// The time at which the signature was generated. only valid when signing
// scheme is `notary.x509`.
SigningTime *time.Time `json:"io.cncf.notary.signingTime,omitempty"`

// The time at which the signature was generated. only valid when signing scheme is `notary.x509.signingAuthority`
// The time at which the signature was generated. only valid when signing
// scheme is `notary.x509.signingAuthority`.
AuthenticSigningTime *time.Time `json:"io.cncf.notary.authenticSigningTime,omitempty"`

// The user defined attributes.
Expand All @@ -65,7 +67,7 @@ type jwsUnprotectedHeader struct {
// as defined at https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.6.
CertChain [][]byte `json:"x5c"`

// SigningAgent used for signing
// SigningAgent used for signing.
SigningAgent string `json:"io.cncf.notary.signingAgent,omitempty"`
}

Expand Down

0 comments on commit a0304ac

Please sign in to comment.