You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--signing-config and --use-signing-config are now mutually exclusive.
TrustedMaterial and SigningConfig are set in the same line as fetching
the trusted root and signing config.
Signed-off-by: Hayden <8418760+haydentherapper@users.noreply.github.com>
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
119
119
}
120
-
ko.TrustedMaterial=trustedMaterial
121
120
}
122
121
}
123
122
124
123
if (o.UseSigningConfig||o.SigningConfigPath!="") &&!o.NewBundleFormat {
125
124
returnfmt.Errorf("must provide --new-bundle-format with --signing-config or --use-signing-config")
126
125
}
127
126
ifo.UseSigningConfig {
128
-
signingConfig, err:=cosign.SigningConfig()
127
+
ko.SigningConfig, err=cosign.SigningConfig()
129
128
iferr!=nil {
130
129
returnfmt.Errorf("error getting signing config from TUF: %w", err)
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
107
107
}
108
-
ko.TrustedMaterial=trustedMaterial
109
108
}
110
109
}
111
110
if (o.UseSigningConfig||o.SigningConfigPath!="") &&o.BundlePath=="" {
112
111
returnfmt.Errorf("must provide --bundle with --signing-config or --use-signing-config")
113
112
}
114
113
ifo.UseSigningConfig {
115
-
signingConfig, err:=cosign.SigningConfig()
114
+
ko.SigningConfig, err=cosign.SigningConfig()
116
115
iferr!=nil {
117
116
returnfmt.Errorf("error getting signing config from TUF: %w", err)
Copy file name to clipboardExpand all lines: cmd/cosign/cli/sign.go
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -143,29 +143,26 @@ race conditions or (worse) malicious tampering.
143
143
returnfmt.Errorf("loading trusted root: %w", err)
144
144
}
145
145
} else {
146
-
trustedMaterial, err:=cosign.TrustedRoot()
146
+
ko.TrustedMaterial, err=cosign.TrustedRoot()
147
147
iferr!=nil {
148
148
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
149
149
}
150
-
ko.TrustedMaterial=trustedMaterial
151
150
}
152
151
}
153
152
154
153
if (o.UseSigningConfig||o.SigningConfigPath!="") &&!o.NewBundleFormat {
155
154
returnfmt.Errorf("must provide --new-bundle-format with --signing-config or --use-signing-config")
156
155
}
157
156
ifo.UseSigningConfig {
158
-
signingConfig, err:=cosign.SigningConfig()
157
+
ko.SigningConfig, err=cosign.SigningConfig()
159
158
iferr!=nil {
160
159
returnfmt.Errorf("error getting signing config from TUF: %w", err)
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
117
117
}
118
-
ko.TrustedMaterial=trustedMaterial
119
118
}
120
119
}
121
120
if (o.UseSigningConfig||o.SigningConfigPath!="") &&o.BundlePath=="" {
122
121
returnfmt.Errorf("must provide --bundle with --signing-config or --use-signing-config")
123
122
}
124
123
ifo.UseSigningConfig {
125
-
signingConfig, err:=cosign.SigningConfig()
124
+
ko.SigningConfig, err=cosign.SigningConfig()
126
125
iferr!=nil {
127
126
returnfmt.Errorf("error getting signing config from TUF: %w", err)
0 commit comments