Remove support for legacy CSV files

This commit is contained in:
Frank Denis 2018-04-18 19:06:50 +02:00
parent 3d67c81697
commit f20da6b611
4 changed files with 6 additions and 66 deletions

View file

@ -1,18 +1,9 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = [
"ed25519",
"ed25519/internal/edwards25519"
]
revision = "d6449816ce06963d9d136eee5a56fca5b0616e7e"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "5046e265393bd5e54f570ce29ae8bc6fa3f30ef5110e922996540400f287c64a"
inputs-digest = "ab4fef131ee828e96ba67d31a7d690bd5f2f42040c6766b1b12fe856f87e0ff7"
solver-name = "gps-cdcl"
solver-version = 1

View file

@ -9,8 +9,6 @@ import (
"net"
"strconv"
"strings"
"golang.org/x/crypto/ed25519"
)
const DefaultPort = 443
@ -60,7 +58,7 @@ func NewDNSCryptServerStampFromLegacy(serverAddrStr string, serverPkStr string,
serverAddrStr = fmt.Sprintf("%s:%d", serverAddrStr, DefaultPort)
}
serverPk, err := hex.DecodeString(strings.Replace(serverPkStr, ":", "", -1))
if err != nil || len(serverPk) != ed25519.PublicKeySize {
if err != nil || len(serverPk) != 32 {
return ServerStamp{}, fmt.Errorf("Unsupported public key: [%s]", serverPkStr)
}
return ServerStamp{