Skip to content

Commit 9811294

Browse files
authored
Merge commit from fork
[v5.4-rhel] machine init: fix tls check
2 parents 3858d68 + 6869884 commit 9811294

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/machine/ocipull/ociartifact.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func (o *OCIArtifactDisk) getDestArtifact() (types.ImageReference, digest.Digest
224224
}
225225
fmt.Printf("Looking up Podman Machine image at %s to create VM\n", imgRef.DockerReference())
226226
sysCtx := &types.SystemContext{
227-
DockerInsecureSkipTLSVerify: types.NewOptionalBool(!o.pullOptions.TLSVerify),
227+
DockerInsecureSkipTLSVerify: o.pullOptions.SkipTLSVerify,
228228
}
229229
imgSrc, err := imgRef.NewImageSource(o.ctx, sysCtx)
230230
if err != nil {

pkg/machine/ocipull/pull.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
// PullOptions includes data to alter certain knobs when pulling a source
2222
// image.
2323
type PullOptions struct {
24-
// Require HTTPS and verify certificates when accessing the registry.
25-
TLSVerify bool
24+
// Skip TLS verification when accessing the registry.
25+
SkipTLSVerify types.OptionalBool
2626
// [username[:password] to use when connecting to the registry.
2727
Credentials string
2828
// Quiet the progress bars when pushing.
@@ -46,7 +46,7 @@ func Pull(ctx context.Context, imageInput types.ImageReference, localDestPath *d
4646
}
4747

4848
sysCtx := &types.SystemContext{
49-
DockerInsecureSkipTLSVerify: types.NewOptionalBool(!options.TLSVerify),
49+
DockerInsecureSkipTLSVerify: options.SkipTLSVerify,
5050
}
5151
if options.Credentials != "" {
5252
authConf, err := parse.AuthConfig(options.Credentials)

0 commit comments

Comments
 (0)