internal

package
v0.1.41 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthorityPath = flag.String("tls-authority-path", "/etc/oriond/ca.crt", "Path to the certificate authority file")
	TLSPath       = flag.String("tls-path", "/etc/oriond/identity.pem", "Path to the certificate authority file")
)

Functions

func CalculateNonce

func CalculateNonce(
	MemberId uint32,
	FriendlyName string,
	Certificate []byte,
	PrivateKey *ecdsa.PrivateKey,
) (*proto.InitializeRequest, error)

Used to calculate the nonce and sign it

func CalculateNonceBytes

func CalculateNonceBytes(MemberId uint32, FriendlyName string, time int64) []byte

Calculate the nonce bytes

func CreateCertPoolFromPEM

func CreateCertPoolFromPEM(PEMData []byte) (*x509.CertPool, error)

Parse a pem file and adds all the pem-encoded certificates to a cert-pool

func GetSelfAddress

func GetSelfAddress(self uint32, other uint32) (*net.IPNet, *net.IPNet, error)

func LoadAuthorityPool added in v0.1.37

func LoadAuthorityPool() (*x509.CertPool, error)

func LoadPemFile added in v0.1.37

func LoadPemFile() (*ecdsa.PrivateKey, []*x509.Certificate)

func LoadX509KeyPair added in v0.1.37

func LoadX509KeyPair(privateKey *ecdsa.PrivateKey, chain []*x509.Certificate) tls.Certificate

func ParsePEMCertificate

func ParsePEMCertificate(Certificate []byte) (*x509.Certificate, error)

Types

type LockableTasks

type LockableTasks struct {
	// contains filtered or unexported fields
}

func NewLockableTasks

func NewLockableTasks(tasksCount int) LockableTasks

func (*LockableTasks) AssignSessionId

func (r *LockableTasks) AssignSessionId(ctx context.Context) (*Task, error)

type Task

type Task struct {
	Id int
	// contains filtered or unexported fields
}

func (Task) Release

func (r Task) Release()

type WireguardInterface

type WireguardInterface struct {
	WgLink WireguardNetLink
	// contains filtered or unexported fields
}

func NewWireguardInterface

func NewWireguardInterface(wg *wgctrl.Client, interfaceAttrs *netlink.LinkAttrs, configuration wgtypes.Config) (*WireguardInterface, error)

func (*WireguardInterface) Dispose

func (c *WireguardInterface) Dispose()

func (*WireguardInterface) SetAddress

func (c *WireguardInterface) SetAddress(ip *net.IPNet) error

func (*WireguardInterface) SetPeers

func (c *WireguardInterface) SetPeers(wg *wgctrl.Client, peers []wgtypes.PeerConfig) error
type WireguardNetLink struct {
	netlink.Link
	InterfaceAttrs *netlink.LinkAttrs
}

func (WireguardNetLink) Attrs

func (r WireguardNetLink) Attrs() *netlink.LinkAttrs

func (WireguardNetLink) Type

func (r WireguardNetLink) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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