trust

package
v0.6.76 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Overview

Package trust builds the sandbox's CA bundle: the system roots plus the egress gateway's interception CA, written to the writable trust store that SSL_CERT_FILE, NODE_EXTRA_CA_CERTS, REQUESTS_CA_BUNDLE and GIT_SSL_CAINFO point at.

Index

Constants

View Source
const DefaultSystemBundle = "/etc/ssl/certs/ca-certificates.crt"

DefaultSystemBundle is Debian's system bundle.

View Source
const JavaStorePassword = "changeit"

JavaStorePassword is the JDK's default cacerts password.

Variables

View Source
var DefaultEgressCAGlobs = []string{"/run/ate/egress-trust-bundle/*.pem", "/var/run/ate/egress-trust-bundle/*.pem"}

DefaultEgressCAGlobs are where Substrate projects the egress trust bundle.

View Source
var EnvVars = []string{"SSL_CERT_FILE", "NODE_EXTRA_CA_CERTS", "REQUESTS_CA_BUNDLE", "GIT_SSL_CAINFO", "CURL_CA_BUNDLE", "AWS_CA_BUNDLE"}

EnvVars are the variables that must point at the bundle.

Functions

func Build

func Build(out, system string, extraGlobs []string) (int, error)

Build writes system + extra certificates to out (replacing a symlink with a file) and returns the number of extra certificates added. Duplicate certificates are written once.

func Certificates

func Certificates(globs []string) [][]byte

Certificates returns the DER certificates in the PEM files matched by globs.

func ImportJava

func ImportJava(ctx context.Context, keytool, store string, certs [][]byte) (int, error)

ImportJava adds certs to a Java truststore (the image's writable java-cacerts, which the JDK's cacerts links to) with keytool. Certificates already present (by alias) are skipped. It returns how many were imported.

func Keytool

func Keytool() string

Keytool finds keytool ($JAVA_HOME/bin first, then PATH); "" when no JDK is installed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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