util

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TkeyModeServer is used for server assigned keying
	TkeyModeServer uint16
	// TkeyModeDH is used for Diffie-Hellman exchanged keying
	TkeyModeDH
	// TkeyModeGSS is used for GSS-API establishment
	TkeyModeGSS
	// TkeyModeResolver is used for resolver assigned keying
	TkeyModeResolver
	// TkeyModeDelete is used for key deletion
	TkeyModeDelete
)

Variables

This section is empty.

Functions

func CopyDNSClient

func CopyDNSClient(dnsClient *dns.Client) (*dns.Client, error)

CopyDNSClient performs a deep copy of dnsClient, changing the network to TCP. If the existing network is configured to only use IPv4 or IPv6 then the appropriate network is chosen to maintain this choice.

func ExchangeTKEY

func ExchangeTKEY(client Exchanger, host, keyname, algorithm string, mode uint16, lifetime uint32, input []byte, extra []dns.RR, tsigname, tsigalgo string) (*dns.TKEY, []dns.RR, error)

ExchangeTKEY exchanges TKEY records with the given host using the given key name, algorithm, mode, and lifetime with the provided input payload. Any additional DNS records are also sent and the exchange can be secured with TSIG if a key name, algorithm and MAC are provided. The TKEY record is returned along with any other DNS records in the response along with any error that occurred.

Types

type Exchanger

type Exchanger interface {
	Exchange(*dns.Msg, string) (*dns.Msg, time.Duration, error)
}

Exchanger is the interface a DNS client is expected to implement.

Jump to

Keyboard shortcuts

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