signer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fallback

type Fallback struct {
	StorageRaw json.RawMessage `json:"storage,omitempty" caddy:"namespace=caddy.storage inline_key=module"`
	// contains filtered or unexported fields
}

Fallback will check if the signers exist in the storage, otherwise generate them. It is the default signer.

func (Fallback) CaddyModule

func (f Fallback) CaddyModule() caddy.ModuleInfo

This method indicates that the type is a Caddy module. The returned ModuleInfo must have both a name and a constructor function. This method must not have any side-effects.

func (*Fallback) Configure

func (f *Fallback) Configure(ctx session.Context, cfg internalcaddyssh.SignerAdder)

Configure adds the signers/hostkeys to the session

func (*Fallback) GoSSHSigner

func (f *Fallback) GoSSHSigner() []gossh.Signer

GoSSHSigner returns the collection of signing keys available in the storage

func (*Fallback) Provision

func (f *Fallback) Provision(ctx caddy.Context) error

Provision sets up the Fallback module by loading the storage module then generating/loading the keys as necessary

type Keyfile

type Keyfile struct {
	// Path should be an acceptable URL, so for on-disk files
	// it should be `file:///path/to/file/on/disk`
	Path       string `json:"path,omitempty"`
	Passphrase string `json:"passphrase,omitempty"`
}

Keyfile is a holder of the path and passphrase of key files.

type Static

type Static struct {
	Keys []Keyfile `json:"keys,omitempty"`
	// contains filtered or unexported fields
}

Static is a session signer that uses pre-existing keys, which may be backed as files or retrievable via HTTP

func (Static) CaddyModule

func (s Static) CaddyModule() caddy.ModuleInfo

This method indicates that the type is a Caddy module. The returned ModuleInfo must have both a name and a constructor function. This method must not have any side-effects.

func (*Static) Configure

func (f *Static) Configure(ctx session.Context, cfg internalcaddyssh.SignerAdder)

Configure adds the signers/hostkeys to the session

func (*Static) Provision

func (s *Static) Provision(ctx caddy.Context) error

Provision loads the keys from the specified URLs

Jump to

Keyboard shortcuts

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