diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000000..dde1f1d997 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,9 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) +# and commit this file to your remote git repository to share the goodness with others. + +tasks: + - init: go get && go build ./... && go test ./... + command: go run + + diff --git a/acme/autocert/autocert.go b/acme/autocert/autocert.go index 6b4cdf406d..6f46560cd0 100644 --- a/acme/autocert/autocert.go +++ b/acme/autocert/autocert.go @@ -31,7 +31,7 @@ import ( "sync" "time" - "golang.org/x/crypto/acme" + "github.com/gitpod-io/golang-crypto/acme" "golang.org/x/net/idna" ) diff --git a/acme/autocert/autocert_test.go b/acme/autocert/autocert_test.go index 725677574b..cc7fd69953 100644 --- a/acme/autocert/autocert_test.go +++ b/acme/autocert/autocert_test.go @@ -27,8 +27,8 @@ import ( "testing" "time" - "golang.org/x/crypto/acme" - "golang.org/x/crypto/acme/autocert/internal/acmetest" + "github.com/gitpod-io/golang-crypto/acme" + "github.com/gitpod-io/golang-crypto/acme/autocert/internal/acmetest" ) var ( diff --git a/acme/autocert/example_test.go b/acme/autocert/example_test.go index 6c7458b0d5..929c753b1a 100644 --- a/acme/autocert/example_test.go +++ b/acme/autocert/example_test.go @@ -9,7 +9,7 @@ import ( "log" "net/http" - "golang.org/x/crypto/acme/autocert" + "github.com/gitpod-io/golang-crypto/acme/autocert" ) func ExampleNewListener() { diff --git a/acme/autocert/internal/acmetest/ca.go b/acme/autocert/internal/acmetest/ca.go index 504a9a0e07..b658da9b6c 100644 --- a/acme/autocert/internal/acmetest/ca.go +++ b/acme/autocert/internal/acmetest/ca.go @@ -34,7 +34,7 @@ import ( "testing" "time" - "golang.org/x/crypto/acme" + "github.com/gitpod-io/golang-crypto/acme" ) // CAServer is a simple test server which implements ACME spec bits needed for testing. diff --git a/acme/autocert/renewal_test.go b/acme/autocert/renewal_test.go index ffe4af2a5c..3c618e19c9 100644 --- a/acme/autocert/renewal_test.go +++ b/acme/autocert/renewal_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "golang.org/x/crypto/acme" - "golang.org/x/crypto/acme/autocert/internal/acmetest" + "github.com/gitpod-io/golang-crypto/acme" + "github.com/gitpod-io/golang-crypto/acme/autocert/internal/acmetest" ) func TestRenewalNext(t *testing.T) { diff --git a/acme/internal/acmeprobe/prober.go b/acme/internal/acmeprobe/prober.go index 25dba0c50e..bc861b4c23 100644 --- a/acme/internal/acmeprobe/prober.go +++ b/acme/internal/acmeprobe/prober.go @@ -45,7 +45,7 @@ import ( "strings" "time" - "golang.org/x/crypto/acme" + "github.com/gitpod-io/golang-crypto/acme" ) var ( diff --git a/argon2/argon2.go b/argon2/argon2.go index 29f0a2de45..8c4b42b0df 100644 --- a/argon2/argon2.go +++ b/argon2/argon2.go @@ -38,7 +38,7 @@ import ( "encoding/binary" "sync" - "golang.org/x/crypto/blake2b" + "github.com/gitpod-io/golang-crypto/blake2b" ) // The Argon2 version implemented by this package. diff --git a/argon2/blake2b.go b/argon2/blake2b.go index 10f46948dc..2d0ef7a349 100644 --- a/argon2/blake2b.go +++ b/argon2/blake2b.go @@ -8,7 +8,7 @@ import ( "encoding/binary" "hash" - "golang.org/x/crypto/blake2b" + blake2b "github.com/gitpod-io/golang-crypto/blake2b" ) // blake2bHash computes an arbitrary long hash value of in diff --git a/bcrypt/bcrypt.go b/bcrypt/bcrypt.go index dc9311870a..6756217e71 100644 --- a/bcrypt/bcrypt.go +++ b/bcrypt/bcrypt.go @@ -15,7 +15,7 @@ import ( "io" "strconv" - "golang.org/x/crypto/blowfish" + "github.com/gitpod-io/golang-crypto/blowfish" ) const ( diff --git a/chacha20/chacha_generic.go b/chacha20/chacha_generic.go index 93eb5ae6de..c1e9d2b863 100644 --- a/chacha20/chacha_generic.go +++ b/chacha20/chacha_generic.go @@ -12,7 +12,7 @@ import ( "errors" "math/bits" - "golang.org/x/crypto/internal/alias" + "github.com/gitpod-io/golang-crypto/internal/alias" ) const ( diff --git a/chacha20poly1305/chacha20poly1305_amd64.go b/chacha20poly1305/chacha20poly1305_amd64.go index 50695a14f6..f5bb6c0d9a 100644 --- a/chacha20poly1305/chacha20poly1305_amd64.go +++ b/chacha20poly1305/chacha20poly1305_amd64.go @@ -9,7 +9,7 @@ package chacha20poly1305 import ( "encoding/binary" - "golang.org/x/crypto/internal/alias" + "github.com/gitpod-io/golang-crypto/internal/alias" "golang.org/x/sys/cpu" ) diff --git a/chacha20poly1305/chacha20poly1305_generic.go b/chacha20poly1305/chacha20poly1305_generic.go index 6313898f0a..258958d9f9 100644 --- a/chacha20poly1305/chacha20poly1305_generic.go +++ b/chacha20poly1305/chacha20poly1305_generic.go @@ -7,9 +7,9 @@ package chacha20poly1305 import ( "encoding/binary" - "golang.org/x/crypto/chacha20" - "golang.org/x/crypto/internal/alias" - "golang.org/x/crypto/internal/poly1305" + "github.com/gitpod-io/golang-crypto/chacha20" + "github.com/gitpod-io/golang-crypto/internal/alias" + "github.com/gitpod-io/golang-crypto/internal/poly1305" ) func writeWithPadding(p *poly1305.MAC, b []byte) { diff --git a/chacha20poly1305/xchacha20poly1305.go b/chacha20poly1305/xchacha20poly1305.go index 1cebfe946f..e6bc5d34b6 100644 --- a/chacha20poly1305/xchacha20poly1305.go +++ b/chacha20poly1305/xchacha20poly1305.go @@ -8,7 +8,7 @@ import ( "crypto/cipher" "errors" - "golang.org/x/crypto/chacha20" + "github.com/gitpod-io/golang-crypto/chacha20" ) type xchacha20poly1305 struct { diff --git a/cryptobyte/asn1.go b/cryptobyte/asn1.go index 2492f796af..d596900e7e 100644 --- a/cryptobyte/asn1.go +++ b/cryptobyte/asn1.go @@ -11,7 +11,7 @@ import ( "reflect" "time" - "golang.org/x/crypto/cryptobyte/asn1" + "github.com/gitpod-io/golang-crypto/cryptobyte/asn1" ) // This file contains ASN.1-related methods for String and Builder. diff --git a/cryptobyte/asn1_test.go b/cryptobyte/asn1_test.go index 93760b06e9..e67ab83a46 100644 --- a/cryptobyte/asn1_test.go +++ b/cryptobyte/asn1_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "golang.org/x/crypto/cryptobyte/asn1" + "github.com/gitpod-io/golang-crypto/cryptobyte/asn1" ) type readASN1Test struct { diff --git a/cryptobyte/example_test.go b/cryptobyte/example_test.go index 86c098adf6..469f0aa421 100644 --- a/cryptobyte/example_test.go +++ b/cryptobyte/example_test.go @@ -8,8 +8,8 @@ import ( "errors" "fmt" - "golang.org/x/crypto/cryptobyte" - "golang.org/x/crypto/cryptobyte/asn1" + "github.com/gitpod-io/golang-crypto/cryptobyte" + "github.com/gitpod-io/golang-crypto/cryptobyte/asn1" ) func ExampleString_lengthPrefixed() { diff --git a/curve25519/curve25519_test.go b/curve25519/curve25519_test.go index e2b338b5ec..9d3596ee8c 100644 --- a/curve25519/curve25519_test.go +++ b/curve25519/curve25519_test.go @@ -10,7 +10,7 @@ import ( "encoding/hex" "testing" - "golang.org/x/crypto/curve25519" + "github.com/gitpod-io/golang-crypto/curve25519" ) const expectedHex = "89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a" diff --git a/ed25519/ed25519_test.go b/ed25519/ed25519_test.go index ab433ba02b..e476399e0c 100644 --- a/ed25519/ed25519_test.go +++ b/ed25519/ed25519_test.go @@ -8,7 +8,7 @@ import ( ed25519std "crypto/ed25519" "testing" - "golang.org/x/crypto/ed25519" + "github.com/gitpod-io/golang-crypto/ed25519" ) func TestTypeAlias(t *testing.T) { diff --git a/go.mod b/go.mod index 4a13082a28..74c6c2964d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module golang.org/x/crypto +module github.com/gitpod-io/golang-crypto go 1.20 diff --git a/hkdf/example_test.go b/hkdf/example_test.go index e89c260e9b..dfdb6af80e 100644 --- a/hkdf/example_test.go +++ b/hkdf/example_test.go @@ -11,7 +11,7 @@ import ( "fmt" "io" - "golang.org/x/crypto/hkdf" + "github.com/gitpod-io/golang-crypto/hkdf" ) // Usage example that expands one master secret into three other diff --git a/internal/wycheproof/aead_test.go b/internal/wycheproof/aead_test.go index 292d85425f..c42c3c625c 100644 --- a/internal/wycheproof/aead_test.go +++ b/internal/wycheproof/aead_test.go @@ -11,7 +11,7 @@ import ( "fmt" "testing" - "golang.org/x/crypto/chacha20poly1305" + "github.com/gitpod-io/golang-crypto/chacha20poly1305" ) func TestAEAD(t *testing.T) { diff --git a/internal/wycheproof/dsa_test.go b/internal/wycheproof/dsa_test.go index e554708460..fc5cffe6e3 100644 --- a/internal/wycheproof/dsa_test.go +++ b/internal/wycheproof/dsa_test.go @@ -8,7 +8,7 @@ import ( "crypto/dsa" "testing" - wdsa "golang.org/x/crypto/internal/wycheproof/internal/dsa" + wdsa "github.com/gitpod-io/golang-crypto/internal/wycheproof/internal/dsa" ) func TestDsa(t *testing.T) { diff --git a/internal/wycheproof/ecdh_test.go b/internal/wycheproof/ecdh_test.go index a3918ba62f..f3f181f9af 100644 --- a/internal/wycheproof/ecdh_test.go +++ b/internal/wycheproof/ecdh_test.go @@ -14,8 +14,8 @@ import ( "fmt" "testing" - "golang.org/x/crypto/cryptobyte" - casn1 "golang.org/x/crypto/cryptobyte/asn1" + "github.com/gitpod-io/golang-crypto/cryptobyte" + casn1 "github.com/gitpod-io/golang-crypto/cryptobyte/asn1" ) func TestECDH(t *testing.T) { diff --git a/internal/wycheproof/ecdsa_test.go b/internal/wycheproof/ecdsa_test.go index 80125ada75..48f094c9ca 100644 --- a/internal/wycheproof/ecdsa_test.go +++ b/internal/wycheproof/ecdsa_test.go @@ -9,8 +9,8 @@ import ( "math/big" "testing" - "golang.org/x/crypto/cryptobyte" - "golang.org/x/crypto/cryptobyte/asn1" + "github.com/gitpod-io/golang-crypto/cryptobyte" + "github.com/gitpod-io/golang-crypto/cryptobyte/asn1" ) func TestECDSA(t *testing.T) { diff --git a/internal/wycheproof/hkdf_test.go b/internal/wycheproof/hkdf_test.go index 6b72e2c870..ae272e720a 100644 --- a/internal/wycheproof/hkdf_test.go +++ b/internal/wycheproof/hkdf_test.go @@ -9,7 +9,7 @@ import ( "io" "testing" - "golang.org/x/crypto/hkdf" + "github.com/gitpod-io/golang-crypto/hkdf" ) func TestHkdf(t *testing.T) { diff --git a/internal/wycheproof/internal/dsa/dsa.go b/internal/wycheproof/internal/dsa/dsa.go index 3101dfc1c2..f4a083417a 100644 --- a/internal/wycheproof/internal/dsa/dsa.go +++ b/internal/wycheproof/internal/dsa/dsa.go @@ -10,8 +10,8 @@ import ( "crypto/dsa" "math/big" - "golang.org/x/crypto/cryptobyte" - "golang.org/x/crypto/cryptobyte/asn1" + "github.com/gitpod-io/golang-crypto/cryptobyte" + "github.com/gitpod-io/golang-crypto/cryptobyte/asn1" ) // VerifyASN1 verifies the ASN1 encoded signature, sig, of hash using the diff --git a/md4/example_test.go b/md4/example_test.go index db3f59b19b..4a3be2fe7c 100644 --- a/md4/example_test.go +++ b/md4/example_test.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "golang.org/x/crypto/md4" + "github.com/gitpod-io/golang-crypto/md4" ) func ExampleNew() { diff --git a/nacl/auth/example_test.go b/nacl/auth/example_test.go index 02a2cd6c46..67f049491c 100644 --- a/nacl/auth/example_test.go +++ b/nacl/auth/example_test.go @@ -8,7 +8,7 @@ import ( "encoding/hex" "fmt" - "golang.org/x/crypto/nacl/auth" + "github.com/gitpod-io/golang-crypto/nacl/auth" ) func Example() { diff --git a/nacl/box/box.go b/nacl/box/box.go index 357bdc773c..04b83bae7a 100644 --- a/nacl/box/box.go +++ b/nacl/box/box.go @@ -41,10 +41,10 @@ import ( cryptorand "crypto/rand" "io" - "golang.org/x/crypto/blake2b" - "golang.org/x/crypto/curve25519" - "golang.org/x/crypto/nacl/secretbox" - "golang.org/x/crypto/salsa20/salsa" + "github.com/gitpod-io/golang-crypto/blake2b" + "github.com/gitpod-io/golang-crypto/curve25519" + "github.com/gitpod-io/golang-crypto/nacl/secretbox" + "github.com/gitpod-io/golang-crypto/salsa20/salsa" ) const ( diff --git a/nacl/box/box_test.go b/nacl/box/box_test.go index cce1f3b4da..0d1e652988 100644 --- a/nacl/box/box_test.go +++ b/nacl/box/box_test.go @@ -10,7 +10,7 @@ import ( "encoding/hex" "testing" - "golang.org/x/crypto/curve25519" + "github.com/gitpod-io/golang-crypto/curve25519" ) func TestSealOpen(t *testing.T) { diff --git a/nacl/box/example_test.go b/nacl/box/example_test.go index 25e42d2be9..fccbc9ec81 100644 --- a/nacl/box/example_test.go +++ b/nacl/box/example_test.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "golang.org/x/crypto/nacl/box" + "github.com/gitpod-io/golang-crypto/nacl/box" ) func Example() { diff --git a/nacl/secretbox/example_test.go b/nacl/secretbox/example_test.go index 789f4ff03f..75087484d9 100644 --- a/nacl/secretbox/example_test.go +++ b/nacl/secretbox/example_test.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "golang.org/x/crypto/nacl/secretbox" + "github.com/gitpod-io/golang-crypto/nacl/secretbox" ) func Example() { diff --git a/nacl/secretbox/secretbox.go b/nacl/secretbox/secretbox.go index 1fe600ad03..7ee69befa9 100644 --- a/nacl/secretbox/secretbox.go +++ b/nacl/secretbox/secretbox.go @@ -35,9 +35,9 @@ This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html. package secretbox import ( - "golang.org/x/crypto/internal/alias" - "golang.org/x/crypto/internal/poly1305" - "golang.org/x/crypto/salsa20/salsa" + "github.com/gitpod-io/golang-crypto/internal/alias" + "github.com/gitpod-io/golang-crypto/internal/poly1305" + "github.com/gitpod-io/golang-crypto/salsa20/salsa" ) // Overhead is the number of bytes of overhead when boxing a message. diff --git a/nacl/sign/sign.go b/nacl/sign/sign.go index 109c08bb95..f4021f2214 100644 --- a/nacl/sign/sign.go +++ b/nacl/sign/sign.go @@ -24,7 +24,7 @@ import ( "crypto/ed25519" "io" - "golang.org/x/crypto/internal/alias" + "github.com/gitpod-io/golang-crypto/internal/alias" ) // Overhead is the number of bytes of overhead when signing a message. diff --git a/openpgp/armor/armor.go b/openpgp/armor/armor.go index e664d127cb..c599683e8e 100644 --- a/openpgp/armor/armor.go +++ b/openpgp/armor/armor.go @@ -18,7 +18,7 @@ import ( "encoding/base64" "io" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // A Block represents an OpenPGP armored structure. diff --git a/openpgp/clearsign/clearsign.go b/openpgp/clearsign/clearsign.go index cea48efdcd..89fe08e5e7 100644 --- a/openpgp/clearsign/clearsign.go +++ b/openpgp/clearsign/clearsign.go @@ -26,9 +26,9 @@ import ( "strconv" "strings" - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" + "github.com/gitpod-io/golang-crypto/openpgp/armor" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/packet" ) // A Block represents a clearsigned message. A signature on a Block can diff --git a/openpgp/clearsign/clearsign_test.go b/openpgp/clearsign/clearsign_test.go index 821c35ff47..68c3bc5219 100644 --- a/openpgp/clearsign/clearsign_test.go +++ b/openpgp/clearsign/clearsign_test.go @@ -10,8 +10,8 @@ import ( "io" "testing" - "golang.org/x/crypto/openpgp" - "golang.org/x/crypto/openpgp/packet" + "github.com/gitpod-io/golang-crypto/openpgp" + "github.com/gitpod-io/golang-crypto/openpgp/packet" ) func testParse(t *testing.T, input []byte, expected, expectedPlaintext string) { diff --git a/openpgp/keys.go b/openpgp/keys.go index d62f787e9d..c773de1eac 100644 --- a/openpgp/keys.go +++ b/openpgp/keys.go @@ -9,9 +9,9 @@ import ( "io" "time" - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" + "github.com/gitpod-io/golang-crypto/openpgp/armor" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/packet" ) // PublicKeyType is the armor type for a PGP public key. diff --git a/openpgp/keys_test.go b/openpgp/keys_test.go index 9631eb6408..d53941b1a0 100644 --- a/openpgp/keys_test.go +++ b/openpgp/keys_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/packet" ) func TestKeyExpiry(t *testing.T) { diff --git a/openpgp/packet/compressed.go b/openpgp/packet/compressed.go index 353f945247..1ee89ecc8b 100644 --- a/openpgp/packet/compressed.go +++ b/openpgp/packet/compressed.go @@ -8,9 +8,10 @@ import ( "compress/bzip2" "compress/flate" "compress/zlib" - "golang.org/x/crypto/openpgp/errors" "io" "strconv" + + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // Compressed represents a compressed OpenPGP packet. The decompressed contents diff --git a/openpgp/packet/encrypted_key.go b/openpgp/packet/encrypted_key.go index 6d7639722c..549a973ee0 100644 --- a/openpgp/packet/encrypted_key.go +++ b/openpgp/packet/encrypted_key.go @@ -12,8 +12,8 @@ import ( "math/big" "strconv" - "golang.org/x/crypto/openpgp/elgamal" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/elgamal" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) const encryptedKeyVersion = 3 diff --git a/openpgp/packet/one_pass_signature.go b/openpgp/packet/one_pass_signature.go index 1713503395..1af8c8e2e0 100644 --- a/openpgp/packet/one_pass_signature.go +++ b/openpgp/packet/one_pass_signature.go @@ -7,10 +7,11 @@ package packet import ( "crypto" "encoding/binary" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" "io" "strconv" + + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/s2k" ) // OnePassSignature represents a one-pass signature packet. See RFC 4880, diff --git a/openpgp/packet/opaque.go b/openpgp/packet/opaque.go index 3984477310..3262cf2626 100644 --- a/openpgp/packet/opaque.go +++ b/openpgp/packet/opaque.go @@ -8,7 +8,7 @@ import ( "bytes" "io" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is diff --git a/openpgp/packet/packet.go b/openpgp/packet/packet.go index a84a1a214e..1a5ef3668b 100644 --- a/openpgp/packet/packet.go +++ b/openpgp/packet/packet.go @@ -22,8 +22,8 @@ import ( "math/big" "math/bits" - "golang.org/x/crypto/cast5" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/cast5" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // readFull is the same as io.ReadFull except that reading zero bytes returns diff --git a/openpgp/packet/packet_test.go b/openpgp/packet/packet_test.go index c8fc4e50c0..918c8abc16 100644 --- a/openpgp/packet/packet_test.go +++ b/openpgp/packet/packet_test.go @@ -8,9 +8,10 @@ import ( "bytes" "encoding/hex" "fmt" - "golang.org/x/crypto/openpgp/errors" "io" "testing" + + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) func TestReadFull(t *testing.T) { diff --git a/openpgp/packet/private_key.go b/openpgp/packet/private_key.go index 192aac376d..0992ed6b73 100644 --- a/openpgp/packet/private_key.go +++ b/openpgp/packet/private_key.go @@ -17,9 +17,9 @@ import ( "strconv" "time" - "golang.org/x/crypto/openpgp/elgamal" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" + "github.com/gitpod-io/golang-crypto/openpgp/elgamal" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/s2k" ) // PrivateKey represents a possibly encrypted private key. See RFC 4880, diff --git a/openpgp/packet/public_key.go b/openpgp/packet/public_key.go index fcd5f52519..0d9eb505ae 100644 --- a/openpgp/packet/public_key.go +++ b/openpgp/packet/public_key.go @@ -22,8 +22,8 @@ import ( "strconv" "time" - "golang.org/x/crypto/openpgp/elgamal" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/elgamal" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) var ( diff --git a/openpgp/packet/public_key_v3.go b/openpgp/packet/public_key_v3.go index 5daf7b6cfd..25ee4e18ba 100644 --- a/openpgp/packet/public_key_v3.go +++ b/openpgp/packet/public_key_v3.go @@ -16,7 +16,7 @@ import ( "strconv" "time" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // PublicKeyV3 represents older, version 3 public keys. These keys are less secure and diff --git a/openpgp/packet/reader.go b/openpgp/packet/reader.go index 34bc7c613e..6dd0170ea4 100644 --- a/openpgp/packet/reader.go +++ b/openpgp/packet/reader.go @@ -5,8 +5,9 @@ package packet import ( - "golang.org/x/crypto/openpgp/errors" "io" + + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // Reader reads packets from an io.Reader and allows packets to be 'unread' so diff --git a/openpgp/packet/signature.go b/openpgp/packet/signature.go index b2a24a5323..4913660a34 100644 --- a/openpgp/packet/signature.go +++ b/openpgp/packet/signature.go @@ -17,8 +17,8 @@ import ( "strconv" "time" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/s2k" ) const ( diff --git a/openpgp/packet/signature_v3.go b/openpgp/packet/signature_v3.go index 6edff88934..23491f8031 100644 --- a/openpgp/packet/signature_v3.go +++ b/openpgp/packet/signature_v3.go @@ -12,8 +12,8 @@ import ( "strconv" "time" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/s2k" ) // SignatureV3 represents older version 3 signatures. These signatures are less secure diff --git a/openpgp/packet/signature_v3_test.go b/openpgp/packet/signature_v3_test.go index abb2d8c144..8d554a9f6f 100644 --- a/openpgp/packet/signature_v3_test.go +++ b/openpgp/packet/signature_v3_test.go @@ -11,7 +11,7 @@ import ( "io" "testing" - "golang.org/x/crypto/openpgp/armor" + "github.com/gitpod-io/golang-crypto/openpgp/armor" ) func TestSignatureV3Read(t *testing.T) { diff --git a/openpgp/packet/symmetric_key_encrypted.go b/openpgp/packet/symmetric_key_encrypted.go index 744c2d2c42..6bfceb5fa5 100644 --- a/openpgp/packet/symmetric_key_encrypted.go +++ b/openpgp/packet/symmetric_key_encrypted.go @@ -10,8 +10,8 @@ import ( "io" "strconv" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/s2k" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/s2k" ) // This is the largest session key that we'll support. Since no 512-bit cipher diff --git a/openpgp/packet/symmetrically_encrypted.go b/openpgp/packet/symmetrically_encrypted.go index 1a1a62964f..2729586cdc 100644 --- a/openpgp/packet/symmetrically_encrypted.go +++ b/openpgp/packet/symmetrically_encrypted.go @@ -8,10 +8,11 @@ import ( "crypto/cipher" "crypto/sha1" "crypto/subtle" - "golang.org/x/crypto/openpgp/errors" "hash" "io" "strconv" + + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // SymmetricallyEncrypted represents a symmetrically encrypted byte string. The diff --git a/openpgp/packet/symmetrically_encrypted_test.go b/openpgp/packet/symmetrically_encrypted_test.go index 4c47c7b145..57fd437879 100644 --- a/openpgp/packet/symmetrically_encrypted_test.go +++ b/openpgp/packet/symmetrically_encrypted_test.go @@ -8,9 +8,10 @@ import ( "bytes" "crypto/sha1" "encoding/hex" - "golang.org/x/crypto/openpgp/errors" "io" "testing" + + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // TestReader wraps a []byte and returns reads of a specific length. diff --git a/openpgp/read.go b/openpgp/read.go index cff3db9196..c3e59601e1 100644 --- a/openpgp/read.go +++ b/openpgp/read.go @@ -18,9 +18,9 @@ import ( "io" "strconv" - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" + "github.com/gitpod-io/golang-crypto/openpgp/armor" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/packet" ) // SignatureType is the armor type for a PGP signature. diff --git a/openpgp/read_test.go b/openpgp/read_test.go index 6bbfaf1afb..7210507add 100644 --- a/openpgp/read_test.go +++ b/openpgp/read_test.go @@ -12,8 +12,8 @@ import ( "strings" "testing" - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/armor" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) func readerFromHex(s string) io.Reader { diff --git a/openpgp/s2k/s2k.go b/openpgp/s2k/s2k.go index fa1a919079..43bb7840d2 100644 --- a/openpgp/s2k/s2k.go +++ b/openpgp/s2k/s2k.go @@ -18,7 +18,7 @@ import ( "io" "strconv" - "golang.org/x/crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/errors" ) // Config collects configuration parameters for s2k key-stretching diff --git a/openpgp/s2k/s2k_test.go b/openpgp/s2k/s2k_test.go index 183d26056b..f12e2d92e3 100644 --- a/openpgp/s2k/s2k_test.go +++ b/openpgp/s2k/s2k_test.go @@ -15,7 +15,7 @@ import ( "encoding/hex" "testing" - _ "golang.org/x/crypto/ripemd160" + _ "github.com/gitpod-io/golang-crypto/ripemd160" ) var saltedTests = []struct { diff --git a/openpgp/write.go b/openpgp/write.go index b89d48b81d..64fdf075eb 100644 --- a/openpgp/write.go +++ b/openpgp/write.go @@ -11,10 +11,10 @@ import ( "strconv" "time" - "golang.org/x/crypto/openpgp/armor" - "golang.org/x/crypto/openpgp/errors" - "golang.org/x/crypto/openpgp/packet" - "golang.org/x/crypto/openpgp/s2k" + "github.com/gitpod-io/golang-crypto/openpgp/armor" + "github.com/gitpod-io/golang-crypto/openpgp/errors" + "github.com/gitpod-io/golang-crypto/openpgp/packet" + "github.com/gitpod-io/golang-crypto/openpgp/s2k" ) // DetachSign signs message with the private key from signer (which must diff --git a/openpgp/write_test.go b/openpgp/write_test.go index 8b686789ee..759760e8e3 100644 --- a/openpgp/write_test.go +++ b/openpgp/write_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "golang.org/x/crypto/openpgp/packet" + "github.com/gitpod-io/golang-crypto/openpgp/packet" ) func TestSignDetached(t *testing.T) { diff --git a/pkcs12/crypto.go b/pkcs12/crypto.go index 212538cb5a..26a95d6d80 100644 --- a/pkcs12/crypto.go +++ b/pkcs12/crypto.go @@ -12,7 +12,7 @@ import ( "encoding/asn1" "errors" - "golang.org/x/crypto/pkcs12/internal/rc2" + "github.com/gitpod-io/golang-crypto/pkcs12/internal/rc2" ) var ( diff --git a/poly1305/poly1305_compat.go b/poly1305/poly1305_compat.go index cb9207f300..a4573e67fd 100644 --- a/poly1305/poly1305_compat.go +++ b/poly1305/poly1305_compat.go @@ -23,7 +23,7 @@ // purpose MAC such as HMAC implemented by crypto/hmac. package poly1305 -import "golang.org/x/crypto/internal/poly1305" +import "github.com/gitpod-io/golang-crypto/internal/poly1305" // TagSize is the size, in bytes, of a poly1305 authenticator. // diff --git a/salsa20/salsa20.go b/salsa20/salsa20.go index e75c9342a8..814bb16fdb 100644 --- a/salsa20/salsa20.go +++ b/salsa20/salsa20.go @@ -24,8 +24,8 @@ package salsa20 // TODO(agl): implement XORKeyStream12 and XORKeyStream8 - the reduced round variants of Salsa20. import ( - "golang.org/x/crypto/internal/alias" - "golang.org/x/crypto/salsa20/salsa" + "github.com/gitpod-io/golang-crypto/internal/alias" + "github.com/gitpod-io/golang-crypto/salsa20/salsa" ) // XORKeyStream crypts bytes from in to out using the given key and nonce. diff --git a/scrypt/example_test.go b/scrypt/example_test.go index 6736479b19..5905e1ed85 100644 --- a/scrypt/example_test.go +++ b/scrypt/example_test.go @@ -9,7 +9,7 @@ import ( "fmt" "log" - "golang.org/x/crypto/scrypt" + "github.com/gitpod-io/golang-crypto/scrypt" ) func Example() { diff --git a/scrypt/scrypt.go b/scrypt/scrypt.go index 76fa40fb20..9309a7293b 100644 --- a/scrypt/scrypt.go +++ b/scrypt/scrypt.go @@ -13,7 +13,7 @@ import ( "errors" "math/bits" - "golang.org/x/crypto/pbkdf2" + "github.com/gitpod-io/golang-crypto/pbkdf2" ) const maxInt = int(^uint(0) >> 1) diff --git a/sha3/allocations_test.go b/sha3/allocations_test.go index 36de5d547e..fe1858640e 100644 --- a/sha3/allocations_test.go +++ b/sha3/allocations_test.go @@ -10,7 +10,7 @@ import ( "runtime" "testing" - "golang.org/x/crypto/sha3" + "github.com/gitpod-io/golang-crypto/sha3" ) var sink byte diff --git a/ssh/agent/client.go b/ssh/agent/client.go index 106708d289..8eba709a01 100644 --- a/ssh/agent/client.go +++ b/ssh/agent/client.go @@ -27,7 +27,7 @@ import ( "math/big" "sync" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) // SignatureFlags represent additional flags that can be passed to the signature diff --git a/ssh/agent/client_test.go b/ssh/agent/client_test.go index f0ffd59592..6e9e1b9b80 100644 --- a/ssh/agent/client_test.go +++ b/ssh/agent/client_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) // startOpenSSHAgent executes ssh-agent, and returns an Agent interface to it. diff --git a/ssh/agent/example_test.go b/ssh/agent/example_test.go index 1fedaea1d6..dd4284fd36 100644 --- a/ssh/agent/example_test.go +++ b/ssh/agent/example_test.go @@ -9,8 +9,8 @@ import ( "net" "os" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" + "github.com/gitpod-io/golang-crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh/agent" ) func ExampleNewClient() { diff --git a/ssh/agent/forward.go b/ssh/agent/forward.go index fd24ba900d..f6777dcf47 100644 --- a/ssh/agent/forward.go +++ b/ssh/agent/forward.go @@ -10,7 +10,7 @@ import ( "net" "sync" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) // RequestAgentForwarding sets up agent forwarding for the session. diff --git a/ssh/agent/keyring.go b/ssh/agent/keyring.go index c1b4361087..c8dfaf7180 100644 --- a/ssh/agent/keyring.go +++ b/ssh/agent/keyring.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) type privKey struct { diff --git a/ssh/agent/server.go b/ssh/agent/server.go index e35ca7ce31..ba3fc23065 100644 --- a/ssh/agent/server.go +++ b/ssh/agent/server.go @@ -17,7 +17,7 @@ import ( "log" "math/big" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) // server wraps an Agent and uses it to implement the agent side of diff --git a/ssh/agent/server_test.go b/ssh/agent/server_test.go index 7700d18f1a..fb6b9ca431 100644 --- a/ssh/agent/server_test.go +++ b/ssh/agent/server_test.go @@ -13,7 +13,7 @@ import ( "strings" "testing" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) func TestServer(t *testing.T) { diff --git a/ssh/agent/testdata_test.go b/ssh/agent/testdata_test.go index cc42a87cb9..192a12c1ac 100644 --- a/ssh/agent/testdata_test.go +++ b/ssh/agent/testdata_test.go @@ -12,8 +12,8 @@ import ( "crypto/rand" "fmt" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/testdata" + "github.com/gitpod-io/golang-crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh/testdata" ) var ( diff --git a/ssh/cipher.go b/ssh/cipher.go index 741e984f33..18f934599b 100644 --- a/ssh/cipher.go +++ b/ssh/cipher.go @@ -16,8 +16,8 @@ import ( "hash" "io" - "golang.org/x/crypto/chacha20" - "golang.org/x/crypto/internal/poly1305" + "github.com/gitpod-io/golang-crypto/chacha20" + "github.com/gitpod-io/golang-crypto/internal/poly1305" ) const ( diff --git a/ssh/cipher_test.go b/ssh/cipher_test.go index f1be0d6db4..83168f3e7b 100644 --- a/ssh/cipher_test.go +++ b/ssh/cipher_test.go @@ -12,8 +12,8 @@ import ( "io" "testing" - "golang.org/x/crypto/chacha20" - "golang.org/x/crypto/internal/poly1305" + "github.com/gitpod-io/golang-crypto/chacha20" + "github.com/gitpod-io/golang-crypto/internal/poly1305" ) func TestDefaultCiphersExist(t *testing.T) { diff --git a/ssh/connection.go b/ssh/connection.go index 8f345ee924..c816299df4 100644 --- a/ssh/connection.go +++ b/ssh/connection.go @@ -41,6 +41,9 @@ type ConnMetadata interface { // LocalAddr returns the local address for this connection. LocalAddr() net.Addr + + // RawConn returns the raw net.Conn. + RawConn() net.Conn } // Conn represents an SSH connection for both server and client roles. @@ -141,3 +144,7 @@ func (c *sshConn) ClientVersion() []byte { func (c *sshConn) ServerVersion() []byte { return dup(c.serverVersion) } + +func (c *sshConn) RawConn() net.Conn { + return c.conn +} diff --git a/ssh/example_test.go b/ssh/example_test.go index 97b3b6aba6..47f67022ea 100644 --- a/ssh/example_test.go +++ b/ssh/example_test.go @@ -18,8 +18,8 @@ import ( "strings" "sync" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/terminal" + "github.com/gitpod-io/golang-crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh/terminal" ) func ExampleNewServerConn() { diff --git a/ssh/internal/bcrypt_pbkdf/bcrypt_pbkdf.go b/ssh/internal/bcrypt_pbkdf/bcrypt_pbkdf.go index af81d26654..9cfd3c6989 100644 --- a/ssh/internal/bcrypt_pbkdf/bcrypt_pbkdf.go +++ b/ssh/internal/bcrypt_pbkdf/bcrypt_pbkdf.go @@ -11,7 +11,8 @@ package bcrypt_pbkdf import ( "crypto/sha512" "errors" - "golang.org/x/crypto/blowfish" + + "github.com/gitpod-io/golang-crypto/blowfish" ) const blockSize = 32 diff --git a/ssh/kex.go b/ssh/kex.go index 8a05f79902..95f6993a79 100644 --- a/ssh/kex.go +++ b/ssh/kex.go @@ -16,7 +16,7 @@ import ( "io" "math/big" - "golang.org/x/crypto/curve25519" + "github.com/gitpod-io/golang-crypto/curve25519" ) const ( diff --git a/ssh/keys.go b/ssh/keys.go index 98e6706d5d..a0c2d3a5b8 100644 --- a/ssh/keys.go +++ b/ssh/keys.go @@ -29,7 +29,7 @@ import ( "math/big" "strings" - "golang.org/x/crypto/ssh/internal/bcrypt_pbkdf" + "github.com/gitpod-io/golang-crypto/ssh/internal/bcrypt_pbkdf" ) // Public key algorithms names. These values can appear in PublicKey.Type, diff --git a/ssh/keys_test.go b/ssh/keys_test.go index 7d5b86ff0d..1a4fccfc46 100644 --- a/ssh/keys_test.go +++ b/ssh/keys_test.go @@ -23,7 +23,7 @@ import ( "strings" "testing" - "golang.org/x/crypto/ssh/testdata" + "github.com/gitpod-io/golang-crypto/ssh/testdata" ) func rawKey(pub PublicKey) interface{} { diff --git a/ssh/knownhosts/knownhosts.go b/ssh/knownhosts/knownhosts.go index 7376a8dff2..7fd20ccbf6 100644 --- a/ssh/knownhosts/knownhosts.go +++ b/ssh/knownhosts/knownhosts.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) // See the sshd manpage diff --git a/ssh/knownhosts/knownhosts_test.go b/ssh/knownhosts/knownhosts_test.go index 464dd59249..60eb823fdc 100644 --- a/ssh/knownhosts/knownhosts_test.go +++ b/ssh/knownhosts/knownhosts_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) const edKeyStr = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBAarftlLeoyf+v+nVchEZII/vna2PCV8FaX4vsF5BX" diff --git a/ssh/mux.go b/ssh/mux.go index d2d24c635d..a957523402 100644 --- a/ssh/mux.go +++ b/ssh/mux.go @@ -227,6 +227,8 @@ func (m *mux) onePacket() error { } switch packet[0] { + case msgUnimplemented: + return nil case msgChannelOpen: return m.handleChannelOpen(packet) case msgGlobalRequest, msgRequestSuccess, msgRequestFailure: diff --git a/ssh/server.go b/ssh/server.go index 5b5ccd96f4..8fec52a769 100644 --- a/ssh/server.go +++ b/ssh/server.go @@ -83,6 +83,7 @@ type ServerConfig struct { // attempts to authenticate with auth method "none". // NoClientAuth must also be set to true for this be used, or // this func is unused. + // If the function returns ErrDenied, the connection is terminated. NoClientAuthCallback func(ConnMetadata) (*Permissions, error) // MaxAuthTries specifies the maximum number of authentication attempts @@ -93,6 +94,7 @@ type ServerConfig struct { // PasswordCallback, if non-nil, is called when a user // attempts to authenticate using a password. + // If the function returns ErrDenied, the connection is terminated. PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error) // PublicKeyCallback, if non-nil, is called when a client @@ -103,6 +105,7 @@ type ServerConfig struct { // offered is in fact used to authenticate. To record any data // depending on the public key, store it inside a // Permissions.Extensions entry. + // If the function returns ErrDenied, the connection is terminated. PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error) // KeyboardInteractiveCallback, if non-nil, is called when @@ -112,6 +115,7 @@ type ServerConfig struct { // Challenge rounds. To avoid information leaks, the client // should be presented a challenge even if the user is // unknown. + // If the function returns ErrDenied, the connection is terminated. KeyboardInteractiveCallback func(conn ConnMetadata, client KeyboardInteractiveChallenge) (*Permissions, error) // AuthLogCallback, if non-nil, is called to log all authentication @@ -316,6 +320,19 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) return perms, err } +// WithBannerError is an error wrapper type that can be returned from an authentication +// function to additionally write out a banner error message. +type WithBannerError struct { + Err error + Message string +} + +func (e WithBannerError) Unwrap() error { + return e.Err +} + +func (e WithBannerError) Error() string { return e.Err.Error() } + func checkSourceAddress(addr net.Addr, sourceAddrs string) error { if addr == nil { return errors.New("ssh: no address known for client, but source-address match required") @@ -462,12 +479,19 @@ func (p *PartialSuccessError) Error() string { return "ssh: authenticated with partial success" } -// ErrNoAuth is the error value returned if no -// authentication method has been passed yet. This happens as a normal -// part of the authentication loop, since the client first tries -// 'none' authentication to discover available methods. -// It is returned in ServerAuthError.Errors from NewServerConn. -var ErrNoAuth = errors.New("ssh: no auth passed yet") +var ( + // ErrDenied can be returned from an authentication callback to inform the + // client that access is denied and that no further attempt will be accepted + // on the connection. + ErrDenied = errors.New("ssh: access denied") + + // ErrNoAuth is the error value returned if no + // authentication method has been passed yet. This happens as a normal + // part of the authentication loop, since the client first tries + // 'none' authentication to discover available methods. + // It is returned in ServerAuthError.Errors from NewServerConn. + ErrNoAuth = errors.New("ssh: no auth passed yet") +) // BannerError is an error that can be returned by authentication handlers in // ServerConfig to send a banner message to the client. @@ -775,6 +799,22 @@ userAuthLoop: break userAuthLoop } + var w WithBannerError + if errors.As(authErr, &w) && w.Message != "" { + bannerMsg := &userAuthBannerMsg{Message: w.Message} + if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil { + return nil, err + } + } + if errors.Is(authErr, ErrDenied) { + var failureMsg userAuthFailureMsg + if err := s.transport.writePacket(Marshal(failureMsg)); err != nil { + return nil, err + } + + return nil, authErr + } + var failureMsg userAuthFailureMsg if partialSuccess, ok := authErr.(*PartialSuccessError); ok { diff --git a/ssh/session_test.go b/ssh/session_test.go index 807a913e5a..67d2f0b24b 100644 --- a/ssh/session_test.go +++ b/ssh/session_test.go @@ -16,7 +16,7 @@ import ( "sync" "testing" - "golang.org/x/crypto/ssh/terminal" + "github.com/gitpod-io/golang-crypto/ssh/terminal" ) type serverType func(Channel, <-chan *Request, *testing.T) diff --git a/ssh/test/agent_unix_test.go b/ssh/test/agent_unix_test.go index 9257bfe1bc..461b49aff2 100644 --- a/ssh/test/agent_unix_test.go +++ b/ssh/test/agent_unix_test.go @@ -10,8 +10,8 @@ import ( "bytes" "testing" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" + "github.com/gitpod-io/golang-crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh/agent" ) func TestAgentForward(t *testing.T) { diff --git a/ssh/test/cert_test.go b/ssh/test/cert_test.go index 9555a097b0..b1650037b8 100644 --- a/ssh/test/cert_test.go +++ b/ssh/test/cert_test.go @@ -11,7 +11,7 @@ import ( "crypto/rand" "testing" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) // Test both logging in with a cert, and also that the certificate presented by an OpenSSH host can be validated correctly diff --git a/ssh/test/multi_auth_test.go b/ssh/test/multi_auth_test.go index 14cf1cce12..0f729175de 100644 --- a/ssh/test/multi_auth_test.go +++ b/ssh/test/multi_auth_test.go @@ -23,7 +23,7 @@ import ( "strings" "testing" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) // test cases diff --git a/ssh/test/server_test.go b/ssh/test/server_test.go index 5c04fba98c..2ed5f25153 100644 --- a/ssh/test/server_test.go +++ b/ssh/test/server_test.go @@ -7,7 +7,7 @@ package test import ( "net" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) type exitStatusMsg struct { diff --git a/ssh/test/session_test.go b/ssh/test/session_test.go index 53e6645633..f60e51b98e 100644 --- a/ssh/test/session_test.go +++ b/ssh/test/session_test.go @@ -19,7 +19,7 @@ import ( "strings" "testing" - "golang.org/x/crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh" ) func skipIfIssue64959(t *testing.T, err error) { diff --git a/ssh/test/sshcli_test.go b/ssh/test/sshcli_test.go index ac2f7c10a9..2525924a3a 100644 --- a/ssh/test/sshcli_test.go +++ b/ssh/test/sshcli_test.go @@ -13,9 +13,9 @@ import ( "runtime" "testing" - "golang.org/x/crypto/internal/testenv" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/testdata" + "github.com/gitpod-io/golang-crypto/internal/testenv" + "github.com/gitpod-io/golang-crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh/testdata" ) func sshClient(t *testing.T) string { diff --git a/ssh/test/test_unix_test.go b/ssh/test/test_unix_test.go index 12698e49ab..d06db11664 100644 --- a/ssh/test/test_unix_test.go +++ b/ssh/test/test_unix_test.go @@ -22,9 +22,9 @@ import ( "testing" "text/template" - "golang.org/x/crypto/internal/testenv" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/testdata" + "github.com/gitpod-io/golang-crypto/internal/testenv" + "github.com/gitpod-io/golang-crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh/testdata" ) const ( diff --git a/ssh/test/testdata_test.go b/ssh/test/testdata_test.go index a053f67eab..926aae307a 100644 --- a/ssh/test/testdata_test.go +++ b/ssh/test/testdata_test.go @@ -12,8 +12,8 @@ import ( "crypto/rand" "fmt" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/testdata" + "github.com/gitpod-io/golang-crypto/ssh" + "github.com/gitpod-io/golang-crypto/ssh/testdata" ) var ( diff --git a/ssh/testdata_test.go b/ssh/testdata_test.go index 2da8c79dc6..253621ba9f 100644 --- a/ssh/testdata_test.go +++ b/ssh/testdata_test.go @@ -12,7 +12,7 @@ import ( "crypto/rand" "fmt" - "golang.org/x/crypto/ssh/testdata" + "github.com/gitpod-io/golang-crypto/ssh/testdata" ) var ( diff --git a/x509roots/gen_fallback_bundle.go b/x509roots/gen_fallback_bundle.go index ffea49b1e8..6467b748a3 100644 --- a/x509roots/gen_fallback_bundle.go +++ b/x509roots/gen_fallback_bundle.go @@ -22,7 +22,7 @@ import ( "os" "sort" - "golang.org/x/crypto/x509roots/nss" + "github.com/gitpod-io/golang-crypto/x509roots/nss" ) const tmpl = `// Code generated by gen_fallback_bundle.go; DO NOT EDIT. diff --git a/xts/xts.go b/xts/xts.go index d64f536f9d..cad5ed6202 100644 --- a/xts/xts.go +++ b/xts/xts.go @@ -29,7 +29,7 @@ import ( "errors" "sync" - "golang.org/x/crypto/internal/alias" + "github.com/gitpod-io/golang-crypto/internal/alias" ) // Cipher contains an expanded key structure. It is safe for concurrent use if