selfsigned

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 13 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 selfsigned generates and persists the hub's self-signed TLS certificate — used to encrypt the tunnel transport — and its JWT secret, as files in the config folder. Clients pin the cert (its PEM travels in the enroll token), so the self-signed cert both encrypts the channel and authenticates the hub.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Material

type Material struct {
	Cert      tls.Certificate
	CertPEM   []byte // the leaf cert, for clients to pin
	JWTSecret []byte
}

Material is a hub's persistent identity: its TLS cert (+key) and the HMAC secret it signs peer JWTs with.

func Load

func Load(dir string) (*Material, error)

Load reads existing hub material from dir, erroring if it was never created. Used by `enroll` to mint against the SAME cert + secret a running hub uses.

func LoadOrCreate

func LoadOrCreate(dir string, hosts []string) (*Material, error)

LoadOrCreate reads the hub material from dir, generating and persisting it on first run. hosts are the SANs to put on the cert.

Jump to

Keyboard shortcuts

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