Documentation ¶
Index ¶
- Variables
- func CalculateNonce(MemberId uint32, FriendlyName string, Certificate []byte, ...) (*proto.InitializeRequest, error)
- func CalculateNonceBytes(MemberId uint32, FriendlyName string, time int64) []byte
- func CreateCertPoolFromPEM(PEMData []byte) (*x509.CertPool, error)
- func GetSelfAddress(self uint32, other uint32) (*net.IPNet, *net.IPNet, error)
- func LoadTLS(clientCerts bool) (credentials.TransportCredentials, error)
- func ParsePEMCertificate(Certificate []byte) (*x509.Certificate, error)
- type LockableTasks
- type Task
- type WireguardInterface
- type WireguardNetLink
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") CertificatePath = flag.String("tls-certificate-path", "/etc/oriond/identity.crt", "Path to the certificate authority file") KeyPath = flag.String("tls-key-path", "/etc/oriond/identity.key", "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 ¶
Calculate the nonce bytes
func CreateCertPoolFromPEM ¶
Parse a pem file and adds all the pem-encoded certificates to a cert-pool
func GetSelfAddress ¶
func LoadTLS ¶
func LoadTLS(clientCerts bool) (credentials.TransportCredentials, error)
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 WireguardInterface ¶
type WireguardInterface struct { WgLink WireguardNetLink // contains filtered or unexported fields }
func NewWireguardInterface ¶
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 ¶
func (WireguardNetLink) Attrs ¶
func (r WireguardNetLink) Attrs() *netlink.LinkAttrs
func (WireguardNetLink) Type ¶
func (r WireguardNetLink) Type() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.