Skip to content

Commit

Permalink
refactor: use internal envelope to verify (#31)
Browse files Browse the repository at this point in the history
Refactor Verify so that it just returns the payload and signerInfo from the internal envelope.

Signed-off-by: Binbin Li <libinbin@microsoft.com>

Signed-off-by: Binbin Li <libinbin@microsoft.com>
Co-authored-by: Binbin Li <libinbin@microsoft.com>
  • Loading branch information
binbin-li and binbin-li committed Aug 11, 2022
1 parent 0553376 commit b64ffd6
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions signature/internal/base/envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,7 @@ func (e *Envelope) Verify() (*signature.Payload, *signature.SignerInfo, error) {
return nil, nil, &signature.MalformedSignatureError{}
}

payload, _, err := e.Envelope.Verify()
if err != nil {
return nil, nil, err
}

signerInfo, err := e.SignerInfo()
if err != nil {
return nil, nil, err
}

return payload, signerInfo, nil
return e.Envelope.Verify()
}

// Payload returns the payload to be signed.
Expand Down

0 comments on commit b64ffd6

Please sign in to comment.