Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto: No working with go1.13 #34734

Closed
cchantep opened this issue Oct 7, 2019 · 1 comment
Closed

x/crypto: No working with go1.13 #34734

cchantep opened this issue Oct 7, 2019 · 1 comment

Comments

@cchantep
Copy link

cchantep commented Oct 7, 2019

What version of Go are you using (go version)?

go version go1.13.1 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/cchantep/Library/Caches/go-build"
GOENV="/Users/cchantep/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/cchantep/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/local/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/local/lib/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="/usr/bin/clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/72/yly7jbm160gfc2yxtr2mllzw0000gn/T/go-build029258679=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Try to build (gb build):

package main

import (
	"flag"
	"io/ioutil"
	"log"
	"golang.org/x/crypto/ssh"
)

var (
	sftpAddr = flag.String("sftp-addr", "sftp-host:22", "Address to sFTP server")
	sftpKey = flag.String("sftp-key", "/path/to/private.key", "Path to private SSH key")
)

func main() {
	flag.Usage = func() {
		flag.PrintDefaults()
	}

	flag.Parse()

	// Load private key
	key, err := ioutil.ReadFile(*sftpKey)

	if err != nil {
		log.Fatalf("Unable to read private key: %v", err)
	}

	// Create the Signer for this private key.
	signer, err := ssh.ParsePrivateKey(key)

	if err != nil {
		log.Fatalf("Unable to parse private key: %v", err)
	}

	var hostKey ssh.PublicKey

	config := &ssh.ClientConfig{
		User: "user",
		Auth: []ssh.AuthMethod{
			// Use the PublicKeys method for remote authentication.
			ssh.PublicKeys(signer),
		},
		HostKeyCallback: ssh.FixedHostKey(hostKey),
	}

	// Connect to the remote server and perform the SSH handshake.
	client, err := ssh.Dial("tcp", *sftpAddr, config)

	if err != nil {
		log.Fatalf("Unable to connect: %v", err)
	}

	defer client.Close()

	// ---

	log.Printf("OK: %s", *sftpAddr)
}

What did you expect to see?

Successful build

What did you see instead?

golang.org/x/crypto/ed25519
# golang.org/x/crypto/ssh
cipher.go:21:2: can't find import: "golang.org/x/crypto/internal/chacha20"
@gopherbot gopherbot added this to the Unreleased milestone Oct 7, 2019
@bradfitz
Copy link
Contributor

bradfitz commented Oct 7, 2019

We don't support the gb command. You can file a gb bug report at https://github.com/constabulary/gb/issues

@bradfitz bradfitz closed this as completed Oct 7, 2019
@golang golang locked and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants