documentation
This commit is contained in:
parent
8a4647ec22
commit
ffd7a5acb6
|
@ -158,7 +158,7 @@ func (k *RR_DNSKEY) ToDS(h int) *RR_DS {
|
|||
// the values: Inception, Expiration, KeyTag, SignerName and Algorithm.
|
||||
// The rest is copied from the RRset. Returns true when the signing went OK.
|
||||
// The Signature data in the RRSIG is filled by this method.
|
||||
// There is no check if rrset is a proper (RFC 2181) RRSet.
|
||||
// There is no check if RRSet is a proper (RFC 2181) RRSet.
|
||||
func (s *RR_RRSIG) Sign(k PrivateKey, rrset RRset) bool {
|
||||
if k == nil {
|
||||
return false
|
||||
|
|
13
nsec3.go
13
nsec3.go
|
@ -11,8 +11,8 @@ type saltWireFmt struct {
|
|||
Salt string "size-hex"
|
||||
}
|
||||
|
||||
// Hash a string/label according to RFC5155
|
||||
func HashName(label string, ha int, iterations int, salt string) string {
|
||||
// Hash a string/label according to RFC5155.
|
||||
func hashName(label string, ha int, iterations int, salt string) string {
|
||||
saltwire := new(saltWireFmt)
|
||||
saltwire.Salt = salt
|
||||
wire := make([]byte, DefaultMsgSize)
|
||||
|
@ -49,9 +49,10 @@ func HashName(label string, ha int, iterations int, salt string) string {
|
|||
return unpackBase32(nsec3)
|
||||
}
|
||||
|
||||
// Hash the ownername and the next owner name in
|
||||
// an NSEC3 record, use the parameters from the NSEC3 itself.
|
||||
// Hash the ownername and the next owner name in an NSEC3 record according
|
||||
// to RFC 5155.
|
||||
// Use the parameters from the NSEC3 itself.
|
||||
func (nsec3 *RR_NSEC3) HashNames() {
|
||||
nsec3.Header().Name = HashName(nsec3.Header().Name, int(nsec3.Hash), int(nsec3.Iterations), nsec3.Salt)
|
||||
nsec3.NextDomain = HashName(nsec3.NextDomain, int(nsec3.Hash), int(nsec3.Iterations), nsec3.Salt)
|
||||
nsec3.Header().Name = hashName(nsec3.Header().Name, int(nsec3.Hash), int(nsec3.Iterations), nsec3.Salt)
|
||||
nsec3.NextDomain = hashName(nsec3.NextDomain, int(nsec3.Hash), int(nsec3.Iterations), nsec3.Salt)
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
// These channels are global so that all parts of the application
|
||||
// can send queries (or even pick them up)
|
||||
// can send queries (or even pick them up).
|
||||
var (
|
||||
// Request an async query by sending to this channel.
|
||||
QueryRequest chan *Query
|
||||
|
@ -85,8 +85,9 @@ func query(n string, f func(*Conn, *Msg)) {
|
|||
panic("not reached")
|
||||
}
|
||||
|
||||
// Simple query function that waits for and returns the reply.
|
||||
func QuerySimple(n string, d *Conn, m *Msg) (*Msg, os.Error) {
|
||||
// QuerySimple performs a query and waits for the reply before
|
||||
// returning.
|
||||
func SimpleQuery(n string, d *Conn, m *Msg) (*Msg, os.Error) {
|
||||
err := d.Dial(n)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue