mirror of
https://github.com/containers/podman.git
synced 2025-11-30 01:58:46 +08:00
Add --sign-by-sq-fingerprint to push operations
This adds a new feature that allows signing using Sequoia-backed keys. The existing options to sign using GPG-backed keys (and sigstore) remain unchanged, and continue to use the same backends as usual. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@@ -1309,8 +1309,8 @@ func (p *PodmanTestIntegration) removeNetwork(name string) {
|
||||
|
||||
// generatePolicyFile generates a signature verification policy file.
|
||||
// it returns the policy file path.
|
||||
func generatePolicyFile(tempDir string, port int) string {
|
||||
keyPath := filepath.Join(tempDir, "key.gpg")
|
||||
func generatePolicyFile(tempDir string, port int, sequoiaKeyPath string) string {
|
||||
gpgKeyPath := filepath.Join(tempDir, "key.gpg")
|
||||
policyPath := filepath.Join(tempDir, "policy.json")
|
||||
conf := fmt.Sprintf(`
|
||||
{
|
||||
@@ -1339,11 +1339,18 @@ func generatePolicyFile(tempDir string, port int) string {
|
||||
"type": "sigstoreSigned",
|
||||
"keyPath": "testdata/sigstore-key.pub"
|
||||
}
|
||||
],
|
||||
"localhost:%[1]d/simple-sq-signed": [
|
||||
{
|
||||
"type": "signedBy",
|
||||
"keyType": "GPGKeys",
|
||||
"keyPath": "%[3]s"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
`, port, keyPath)
|
||||
`, port, gpgKeyPath, sequoiaKeyPath)
|
||||
writeConf([]byte(conf), policyPath)
|
||||
return policyPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user