pemfile

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pemfile holds the checks shared by the inbound (internal/servertls) and outbound (internal/httpclient) TLS loaders for the PEM files named in configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendCertificates

func AppendCertificates(pool *x509.CertPool, data []byte) error

AppendCertificates adds every certificate in data to pool. Unlike AppendCertsFromPEM, it rejects a block that does not parse, so a bundle cannot silently drop one of its CAs. pem.Decode itself skips a block with bad framing or base64, so the decoded blocks are counted against the BEGIN markers. Like pem.Decode, only a marker that starts a line counts, so a comment that quotes one does not fail the bundle. Blocks of other types are skipped.

func CheckPath

func CheckPath(field, path string) error

CheckPath rejects PEM contents given where a file path belongs, as with SERVER_TLS_KEY_FILE="$(cat tls.key)" or a ${file:...} reference, which resolves to the file's contents. The error names only the field: an *fs.PathError would echo the whole value, writing a private key to the logs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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