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
In 32a2d62 the ability to use TUF to read and refresh trusted_root.json
was added. Prior, there was already a --trusted-root flag for verify*
commands, to read trusted_root.json directly without using a TUF client.
This did not exist for the sign* commands, which still need key material
to verifyi the CT key. The workaround for the sign commands was to use
the SIGSTORE_CT_LOG_PUBLIC_KEY_FILE environment variable, but when the
TUF client was updated, this workaround regressed. This change makes it
so that this flag will still work and that the machine's cached trusted
root is not used if it's not intended to be used. The permanent fix
going forward should be to add the --trusted-root flags to the sign*
commands.
Signed-off-by: Colleen Murphy <colleenmurphy@google.com>
ifo.Key=="" { // Get the trusted root if using fulcio for signing
103
+
ifo.Key==""&&env.Getenv(env.VariableSigstoreCTLogPublicKeyFile) ==""{ // Get the trusted root if using fulcio for signing
103
104
trustedMaterial, err:=cosign.TrustedRoot()
104
105
iferr!=nil {
105
106
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
ifo.Key=="" { // Get the trusted root if using fulcio for signing
88
+
ifo.Key==""&&env.Getenv(env.VariableSigstoreCTLogPublicKeyFile) ==""{ // Get the trusted root if using fulcio for signing
88
89
trustedMaterial, err:=cosign.TrustedRoot()
89
90
iferr!=nil {
90
91
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
ui.Warnf(context.Background(), "Could not fetch trusted_root.json from the TUF repository. Continuing with individual targets. Error from TUF: %v", err)
0 commit comments