summaryrefslogtreecommitdiff
path: root/libpod/image/docker_registry_options.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-07-28 07:26:14 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-01 18:22:59 +0000
commit444142c7c10fb5068e1786bcef37599c78177fd1 (patch)
treecdeac631c4d12c84a8bacdad9b59c7ea85bb600b /libpod/image/docker_registry_options.go
parent1054b8d2c5b3d9b0dff2da82255fbe46480d2ba5 (diff)
downloadpodman-444142c7c10fb5068e1786bcef37599c78177fd1.tar.gz
podman-444142c7c10fb5068e1786bcef37599c78177fd1.tar.bz2
podman-444142c7c10fb5068e1786bcef37599c78177fd1.zip
Remove the signaturePolicyPath parameter from getCopyOptions and DRO.GetSystemContext
Use the parent types.SystemContext data instead. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
Diffstat (limited to 'libpod/image/docker_registry_options.go')
-rw-r--r--libpod/image/docker_registry_options.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go
index e6eea01dd..34abdba45 100644
--- a/libpod/image/docker_registry_options.go
+++ b/libpod/image/docker_registry_options.go
@@ -23,11 +23,9 @@ type DockerRegistryOptions struct {
DockerInsecureSkipTLSVerify bool
}
-// GetSystemContext constructs a new system context from a parent context, the given signaturePolicy path, and the
-// values in the DockerRegistryOptions
-func (o DockerRegistryOptions) GetSystemContext(parent *types.SystemContext, signaturePolicyPath, authFile string, forceCompress bool, additionalDockerArchiveTags []reference.NamedTagged) *types.SystemContext {
+// GetSystemContext constructs a new system context from a parent context. the values in the DockerRegistryOptions, and other parameters.
+func (o DockerRegistryOptions) GetSystemContext(parent *types.SystemContext, authFile string, forceCompress bool, additionalDockerArchiveTags []reference.NamedTagged) *types.SystemContext {
sc := &types.SystemContext{
- SignaturePolicyPath: signaturePolicyPath,
DockerAuthConfig: o.DockerRegistryCreds,
DockerCertPath: o.DockerCertPath,
DockerInsecureSkipTLSVerify: o.DockerInsecureSkipTLSVerify,
@@ -35,6 +33,9 @@ func (o DockerRegistryOptions) GetSystemContext(parent *types.SystemContext, sig
DirForceCompress: forceCompress,
DockerArchiveAdditionalTags: additionalDockerArchiveTags,
}
+ if parent != nil {
+ sc.SignaturePolicyPath = parent.SignaturePolicyPath
+ }
return sc
}