cacert

package
v3.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 8 Imported by: 23

Documentation

Overview

Package cacert provides code to import CA certificate bundles. It is configured by CLI flags and environment variables.

Index

Constants

View Source
const (
	// EnvVarBundleContent is the env var for the CA bundle to import
	EnvVarBundleContent = "ADDITIONAL_CA_CERT_BUNDLE"

	// FlagBundleContent is the CLI flag for the CA bundle to import
	FlagBundleContent = "additional-ca-cert-bundle"

	// DefaultBundlePath is the default import path of the CA bundle
	DefaultBundlePath = "/etc/ssl/certs/ca-certificates.crt"

	// DefaultUBIBundlePath is the default import path of the CA bundle for UBI based images
	DefaultUBIBundlePath = "/etc/pki/ca-trust/source/anchors/ca-certificates.crt"
)

Variables

This section is empty.

Functions

func Import

func Import(c *cli.Context, opts ImportOptions) error

Import writes the CA bundle to its import path. This is a no-op if the CA bundle is empty.

func IsUBIImage added in v3.2.3

func IsUBIImage() bool

IsUBIImage returns true if the current OS is a RHEL-based image

func NewFlags

func NewFlags() []cli.Flag

NewFlags returns CLI flags to configure the import of a CA bundle.

Types

type ImportOptions

type ImportOptions struct {
	Path string // Path specifies where to write the additional CA cert bundle.
}

ImportOptions provides a way to specify optional arguments for the Import function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL