cacert

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 4 Imported by: 10

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"
)

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 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