mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
Recognize the new lookaside names for simple signing sigstore
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@ -22,8 +22,10 @@ type registryConfiguration struct {
|
||||
|
||||
// registryNamespace defines lookaside locations for a single namespace.
|
||||
type registryNamespace struct {
|
||||
SigStore string `json:"sigstore"` // For reading, and if SigStoreStaging is not present, for writing.
|
||||
SigStoreStaging string `json:"sigstore-staging"` // For writing only.
|
||||
Lookaside string `json:"lookaside"` // For reading, and if LookasideStaging is not present, for writing.
|
||||
LookasideStaging string `json:"lookaside-staging"` // For writing only.
|
||||
SigStore string `json:"sigstore"` // For reading, and if SigStoreStaging is not present, for writing.
|
||||
SigStoreStaging string `json:"sigstore-staging"` // For writing only.
|
||||
}
|
||||
|
||||
// systemRegistriesDirPath is the path to registries.d.
|
||||
|
3
pkg/trust/testdata/quay.io.yaml
vendored
Normal file
3
pkg/trust/testdata/quay.io.yaml
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
docker:
|
||||
quay.io/multi-signed:
|
||||
lookaside: https://quay.example.com/sigstore
|
@ -91,7 +91,11 @@ func getPolicyShowOutput(policyContentStruct policyContent, systemRegistriesDirP
|
||||
|
||||
registryNamespace := haveMatchRegistry(repo, registryConfigs)
|
||||
if registryNamespace != nil {
|
||||
tempTrustShowOutput.SignatureStore = registryNamespace.SigStore
|
||||
if registryNamespace.Lookaside != "" {
|
||||
tempTrustShowOutput.SignatureStore = registryNamespace.Lookaside
|
||||
} else { // incl. registryNamespace.SigStore == ""
|
||||
tempTrustShowOutput.SignatureStore = registryNamespace.SigStore
|
||||
}
|
||||
}
|
||||
output = append(output, &tempTrustShowOutput)
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ func TestPolicyDescription(t *testing.T) {
|
||||
Name: "quay.io/multi-signed",
|
||||
RepoName: "quay.io/multi-signed",
|
||||
Type: "signed",
|
||||
SignatureStore: "",
|
||||
SignatureStore: "https://quay.example.com/sigstore",
|
||||
GPGId: "1, 2, 3",
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user