credentials

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package credentials handles to loading and unmarshalling of wallhack credentials using systemd.

Index

Constants

View Source
const (

	// ALPNWallhack is the protocol name of wallhack for ALPN. This string is set as the next protocol of
	// a wallhack TLS connection to distinguish it from HTTP traffic.
	ALPNWallhack = "wallhack"
)

Variables

This section is empty.

Functions

func LoadBytes

func LoadBytes() ([]byte, error)

LoadBytes returns the content of the wallhack credential file offered by systemd.

Types

type Client

type Client struct {
	Cert string `yaml:"cert"`
	Key  string `yaml:"key"`
}

Client represents the credentials for running in client mode.

func (Client) TLSConf

func (c Client) TLSConf() (*tls.Config, error)

TLSConf generates the TLS configuration for read credentials. It can be used to connect to a wallhack server.

type Server

type Server struct {
	Cert string `yaml:"cert"`
	Key  string `yaml:"key"`
	CA   string `yaml:"ca"`
}

Server represents the credentials for running in server mode.

func (Server) TLSConf

func (s Server) TLSConf() (*tls.Config, error)

TLSConf generates the TLS configuration for read credentials. It can be used to listen for client connections.

Jump to

Keyboard shortcuts

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