mirror of
https://github.com/miekg/dns.git
synced 2025-10-06 23:41:01 +02:00
fmt
This commit is contained in:
parent
c96d86da1f
commit
3611c4d458
@ -106,7 +106,7 @@ func (k *RR_DNSKEY) KeyTag() uint16 {
|
|||||||
// item in the pubkey. We could do this faster by looking directly
|
// item in the pubkey. We could do this faster by looking directly
|
||||||
// at the base64 values. But I'm lazy.
|
// at the base64 values. But I'm lazy.
|
||||||
modulus, _ := packBase64([]byte(k.PublicKey))
|
modulus, _ := packBase64([]byte(k.PublicKey))
|
||||||
if (len(modulus) > 1) {
|
if len(modulus) > 1 {
|
||||||
x, _ := unpackUint16(modulus, len(modulus)-2)
|
x, _ := unpackUint16(modulus, len(modulus)-2)
|
||||||
keytag = int(x)
|
keytag = int(x)
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package dns
|
package dns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/dsa"
|
||||||
"crypto/ecdsa"
|
"crypto/ecdsa"
|
||||||
"crypto/elliptic"
|
"crypto/elliptic"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"crypto/rsa"
|
"crypto/rsa"
|
||||||
"crypto/dsa"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
2
kscan.go
2
kscan.go
@ -1,9 +1,9 @@
|
|||||||
package dns
|
package dns
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/dsa"
|
||||||
"crypto/ecdsa"
|
"crypto/ecdsa"
|
||||||
"crypto/rsa"
|
"crypto/rsa"
|
||||||
"crypto/dsa"
|
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -253,10 +253,8 @@ func TestParseNSEC(t *testing.T) {
|
|||||||
|
|
||||||
func TestParseLOC(t *testing.T) {
|
func TestParseLOC(t *testing.T) {
|
||||||
lt := map[string]string{
|
lt := map[string]string{
|
||||||
"SW1A2AA.find.me.uk. LOC 51 30 12.748 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m":
|
"SW1A2AA.find.me.uk. LOC 51 30 12.748 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m": "SW1A2AA.find.me.uk.\t3600\tIN\tLOC\t51 30 12.748 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m",
|
||||||
"SW1A2AA.find.me.uk.\t3600\tIN\tLOC\t51 30 12.748 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m",
|
"SW1A2AA.find.me.uk. LOC 51 0 0.0 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m": "SW1A2AA.find.me.uk.\t3600\tIN\tLOC\t51 00 0.000 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m",
|
||||||
"SW1A2AA.find.me.uk. LOC 51 0 0.0 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m":
|
|
||||||
"SW1A2AA.find.me.uk.\t3600\tIN\tLOC\t51 00 0.000 N 00 07 39.611 W 0.00m 0.00m 0.00m 0.00m",
|
|
||||||
}
|
}
|
||||||
for i, o := range lt {
|
for i, o := range lt {
|
||||||
rr, e := NewRR(i)
|
rr, e := NewRR(i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user