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 LoadAuthorityPool() (*x509.CertPool, error)
- func LoadPemFile() (*ecdsa.PrivateKey, []*x509.Certificate)
- func LoadX509KeyPair(privateKey *ecdsa.PrivateKey, chain []*x509.Certificate) tls.Certificate
- 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") 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 ¶
Calculate the nonce bytes
func CreateCertPoolFromPEM ¶
Parse a pem file and adds all the pem-encoded certificates to a cert-pool
func GetSelfAddress ¶
func LoadAuthorityPool ¶ added in v0.1.37
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 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.