dont export
This commit is contained in:
parent
b1140cec5f
commit
7b406f80ce
|
@ -117,7 +117,7 @@ func (k *RR_DNSKEY) KeyTag() uint16 {
|
|||
keywire.Algorithm = k.Algorithm
|
||||
keywire.PublicKey = k.PublicKey
|
||||
wire := make([]byte, DefaultMsgSize)
|
||||
n, ok := PackStruct(keywire, wire, 0)
|
||||
n, ok := packStruct(keywire, wire, 0)
|
||||
if !ok {
|
||||
return 0
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ func (k *RR_DNSKEY) ToDS(h int) *RR_DS {
|
|||
keywire.Algorithm = k.Algorithm
|
||||
keywire.PublicKey = k.PublicKey
|
||||
wire := make([]byte, DefaultMsgSize)
|
||||
n, ok := PackStruct(keywire, wire, 0)
|
||||
n, ok := packStruct(keywire, wire, 0)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ func (s *RR_RRSIG) Sign(k PrivateKey, rrset []RR) error {
|
|||
|
||||
// Create the desired binary blob
|
||||
signdata := make([]byte, DefaultMsgSize)
|
||||
n, ok := PackStruct(sigwire, signdata, 0)
|
||||
n, ok := packStruct(sigwire, signdata, 0)
|
||||
if !ok {
|
||||
return ErrPack
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ func (s *RR_RRSIG) Verify(k *RR_DNSKEY, rrset []RR) error {
|
|||
sigwire.SignerName = strings.ToLower(s.SignerName)
|
||||
// Create the desired binary blob
|
||||
signeddata := make([]byte, DefaultMsgSize)
|
||||
n, ok := PackStruct(sigwire, signeddata, 0)
|
||||
n, ok := packStruct(sigwire, signeddata, 0)
|
||||
if !ok {
|
||||
return ErrPack
|
||||
}
|
||||
|
|
2
msg.go
2
msg.go
|
@ -650,7 +650,7 @@ func structValue(any interface{}) reflect.Value {
|
|||
return reflect.ValueOf(any).Elem()
|
||||
}
|
||||
|
||||
func PackStruct(any interface{}, msg []byte, off int) (off1 int, ok bool) {
|
||||
func packStruct(any interface{}, msg []byte, off int) (off1 int, ok bool) {
|
||||
off, ok = packStructValue(structValue(any), msg, off, nil, false)
|
||||
return off, ok
|
||||
}
|
||||
|
|
2
nsecx.go
2
nsecx.go
|
@ -38,7 +38,7 @@ func HashName(label string, ha uint8, iter uint16, salt string) string {
|
|||
saltwire := new(saltWireFmt)
|
||||
saltwire.Salt = salt
|
||||
wire := make([]byte, DefaultMsgSize)
|
||||
n, ok := PackStruct(saltwire, wire, 0)
|
||||
n, ok := packStruct(saltwire, wire, 0)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
|
|
6
tsig.go
6
tsig.go
|
@ -259,7 +259,7 @@ func tsigBuffer(msgbuf []byte, rr *RR_TSIG, requestMAC string, timersOnly bool)
|
|||
m.MACSize = uint16(len(requestMAC) / 2)
|
||||
m.MAC = requestMAC
|
||||
buf = make([]byte, len(requestMAC)) // long enough
|
||||
n, _ := PackStruct(m, buf, 0)
|
||||
n, _ := packStruct(m, buf, 0)
|
||||
buf = buf[:n]
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ func tsigBuffer(msgbuf []byte, rr *RR_TSIG, requestMAC string, timersOnly bool)
|
|||
tsig := new(timerWireFmt)
|
||||
tsig.TimeSigned = rr.TimeSigned
|
||||
tsig.Fudge = rr.Fudge
|
||||
n, _ := PackStruct(tsig, tsigvar, 0)
|
||||
n, _ := packStruct(tsig, tsigvar, 0)
|
||||
tsigvar = tsigvar[:n]
|
||||
} else {
|
||||
tsig := new(tsigWireFmt)
|
||||
|
@ -281,7 +281,7 @@ func tsigBuffer(msgbuf []byte, rr *RR_TSIG, requestMAC string, timersOnly bool)
|
|||
tsig.Error = rr.Error
|
||||
tsig.OtherLen = rr.OtherLen
|
||||
tsig.OtherData = rr.OtherData
|
||||
n, _ := PackStruct(tsig, tsigvar, 0)
|
||||
n, _ := packStruct(tsig, tsigvar, 0)
|
||||
tsigvar = tsigvar[:n]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue