Skip to content

Commit

Permalink
reworked template signer
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed Oct 3, 2023
1 parent d8cb12e commit bf7b5af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions v2/cmd/integration-test/integration-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ func runTests(customTemplatePaths []string) []string {
var failedTestTemplatePaths []string

for proto, testCaseInfos := range protocolTests {
if proto != "" && !strings.EqualFold(proto, protocol) {
continue
if protocol != "" {
if !strings.EqualFold(proto, protocol) {
continue
}
}
if len(customTemplatePaths) == 0 {
fmt.Printf("Running test cases for %q protocol\n", aurora.Blue(proto))
Expand Down
7 changes: 2 additions & 5 deletions v2/pkg/templates/template_sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,8 @@ func SignTemplate(templateSigner *signer.TemplateSigner, templatePath string) er
// if template not verified then sign it

if len(template.RequestsCode) > 0 {

Check failure on line 62 in v2/pkg/templates/template_sign.go

View workflow job for this annotation

GitHub Actions / Lint Test

SA9003: empty branch (staticcheck)
//TODO: if template contains code protocol and digest then check if it belongs to user
// digestData := signer.GetSignatureFromData(bin)
// if len(digestData) != 0 {
// return fmt.Errorf("re-signing of code protocol templates is not supported")
// }
// verify using current template signer
// if verified then
}

signatureData, err := templateSigner.Sign(bin, template)
Expand Down

0 comments on commit bf7b5af

Please sign in to comment.