Преглед на файлове

go.crypto: use golang.org/x/... import paths

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/167190043
Andrew Gerrand преди 11 години
родител
ревизия
a73c6bbfc5
променени са 49 файла, в които са добавени 74 реда и са изтрити 74 реда
  1. 1 1
      bcrypt/bcrypt.go
  2. 1 1
      hkdf/example_test.go
  3. 3 3
      nacl/box/box.go
  4. 1 1
      nacl/box/box_test.go
  5. 2 2
      nacl/secretbox/secretbox.go
  6. 1 1
      openpgp/armor/armor.go
  7. 3 3
      openpgp/clearsign/clearsign.go
  8. 1 1
      openpgp/clearsign/clearsign_test.go
  9. 3 3
      openpgp/keys.go
  10. 1 1
      openpgp/keys_test.go
  11. 1 1
      openpgp/packet/compressed.go
  12. 2 2
      openpgp/packet/encrypted_key.go
  13. 2 2
      openpgp/packet/one_pass_signature.go
  14. 1 1
      openpgp/packet/opaque.go
  15. 2 2
      openpgp/packet/packet.go
  16. 1 1
      openpgp/packet/packet_test.go
  17. 3 3
      openpgp/packet/private_key.go
  18. 2 2
      openpgp/packet/public_key.go
  19. 1 1
      openpgp/packet/public_key_v3.go
  20. 1 1
      openpgp/packet/reader.go
  21. 2 2
      openpgp/packet/signature.go
  22. 2 2
      openpgp/packet/signature_v3.go
  23. 1 1
      openpgp/packet/signature_v3_test.go
  24. 2 2
      openpgp/packet/symmetric_key_encrypted.go
  25. 1 1
      openpgp/packet/symmetrically_encrypted.go
  26. 1 1
      openpgp/packet/symmetrically_encrypted_test.go
  27. 3 3
      openpgp/read.go
  28. 1 1
      openpgp/read_test.go
  29. 1 1
      openpgp/s2k/s2k.go
  30. 1 1
      openpgp/s2k/s2k_test.go
  31. 4 4
      openpgp/write.go
  32. 1 1
      salsa20/salsa20.go
  33. 1 1
      scrypt/scrypt.go
  34. 1 1
      ssh/agent/client.go
  35. 1 1
      ssh/agent/client_test.go
  36. 1 1
      ssh/agent/forward.go
  37. 1 1
      ssh/agent/keyring.go
  38. 1 1
      ssh/agent/server.go
  39. 1 1
      ssh/agent/server_test.go
  40. 2 2
      ssh/agent/testdata_test.go
  41. 1 1
      ssh/example_test.go
  42. 1 1
      ssh/keys_test.go
  43. 1 1
      ssh/session_test.go
  44. 2 2
      ssh/test/agent_unix_test.go
  45. 1 1
      ssh/test/cert_test.go
  46. 1 1
      ssh/test/session_test.go
  47. 2 2
      ssh/test/test_unix_test.go
  48. 2 2
      ssh/test/testdata_test.go
  49. 1 1
      ssh/testdata_test.go

+ 1 - 1
bcrypt/bcrypt.go

@@ -8,11 +8,11 @@ package bcrypt
 
 // The code is a port of Provos and Mazières's C implementation.
 import (
-	"code.google.com/p/go.crypto/blowfish"
 	"crypto/rand"
 	"crypto/subtle"
 	"errors"
 	"fmt"
+	"golang.org/x/crypto/blowfish"
 	"io"
 	"strconv"
 )

+ 1 - 1
hkdf/example_test.go

@@ -6,10 +6,10 @@ package hkdf_test
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/hkdf"
 	"crypto/rand"
 	"crypto/sha256"
 	"fmt"
+	"golang.org/x/crypto/hkdf"
 	"io"
 )
 

+ 3 - 3
nacl/box/box.go

@@ -18,9 +18,9 @@ This package is interoperable with NaCl: http://nacl.cr.yp.to/box.html.
 package box
 
 import (
-	"code.google.com/p/go.crypto/curve25519"
-	"code.google.com/p/go.crypto/nacl/secretbox"
-	"code.google.com/p/go.crypto/salsa20/salsa"
+	"golang.org/x/crypto/curve25519"
+	"golang.org/x/crypto/nacl/secretbox"
+	"golang.org/x/crypto/salsa20/salsa"
 	"io"
 )
 

+ 1 - 1
nacl/box/box_test.go

@@ -10,7 +10,7 @@ import (
 	"encoding/hex"
 	"testing"
 
-	"code.google.com/p/go.crypto/curve25519"
+	"golang.org/x/crypto/curve25519"
 )
 
 func TestSealOpen(t *testing.T) {

+ 2 - 2
nacl/secretbox/secretbox.go

@@ -18,8 +18,8 @@ This package is interoperable with NaCl: http://nacl.cr.yp.to/secretbox.html.
 package secretbox
 
 import (
-	"code.google.com/p/go.crypto/poly1305"
-	"code.google.com/p/go.crypto/salsa20/salsa"
+	"golang.org/x/crypto/poly1305"
+	"golang.org/x/crypto/salsa20/salsa"
 )
 
 // Overhead is the number of bytes of overhead when boxing a message.

+ 1 - 1
openpgp/armor/armor.go

@@ -9,8 +9,8 @@ package armor
 import (
 	"bufio"
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"encoding/base64"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 )
 

+ 3 - 3
openpgp/clearsign/clearsign.go

@@ -18,9 +18,9 @@ import (
 	"net/textproto"
 	"strconv"
 
-	"code.google.com/p/go.crypto/openpgp/armor"
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/packet"
+	"golang.org/x/crypto/openpgp/armor"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/packet"
 )
 
 // A Block represents a clearsigned message. A signature on a Block can

+ 1 - 1
openpgp/clearsign/clearsign_test.go

@@ -6,7 +6,7 @@ package clearsign
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp"
+	"golang.org/x/crypto/openpgp"
 	"testing"
 )
 

+ 3 - 3
openpgp/keys.go

@@ -5,10 +5,10 @@
 package openpgp
 
 import (
-	"code.google.com/p/go.crypto/openpgp/armor"
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/packet"
 	"crypto/rsa"
+	"golang.org/x/crypto/openpgp/armor"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/packet"
 	"io"
 	"time"
 )

+ 1 - 1
openpgp/keys_test.go

@@ -4,7 +4,7 @@ import (
 	"testing"
 	"time"
 
-	"code.google.com/p/go.crypto/openpgp/packet"
+	"golang.org/x/crypto/openpgp/packet"
 )
 
 func TestKeyExpiry(t *testing.T) {

+ 1 - 1
openpgp/packet/compressed.go

@@ -5,10 +5,10 @@
 package packet
 
 import (
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"compress/bzip2"
 	"compress/flate"
 	"compress/zlib"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 	"strconv"
 )

+ 2 - 2
openpgp/packet/encrypted_key.go

@@ -5,10 +5,10 @@
 package packet
 
 import (
-	"code.google.com/p/go.crypto/openpgp/elgamal"
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"crypto/rsa"
 	"encoding/binary"
+	"golang.org/x/crypto/openpgp/elgamal"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 	"math/big"
 	"strconv"

+ 2 - 2
openpgp/packet/one_pass_signature.go

@@ -5,10 +5,10 @@
 package packet
 
 import (
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/s2k"
 	"crypto"
 	"encoding/binary"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/s2k"
 	"io"
 	"strconv"
 )

+ 1 - 1
openpgp/packet/opaque.go

@@ -6,7 +6,7 @@ package packet
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 	"io/ioutil"
 )

+ 2 - 2
openpgp/packet/packet.go

@@ -8,11 +8,11 @@ package packet
 
 import (
 	"bufio"
-	"code.google.com/p/go.crypto/cast5"
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"crypto/aes"
 	"crypto/cipher"
 	"crypto/des"
+	"golang.org/x/crypto/cast5"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 	"math/big"
 )

+ 1 - 1
openpgp/packet/packet_test.go

@@ -6,9 +6,9 @@ package packet
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"encoding/hex"
 	"fmt"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 	"io/ioutil"
 	"testing"

+ 3 - 3
openpgp/packet/private_key.go

@@ -6,13 +6,13 @@ package packet
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp/elgamal"
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/s2k"
 	"crypto/cipher"
 	"crypto/dsa"
 	"crypto/rsa"
 	"crypto/sha1"
+	"golang.org/x/crypto/openpgp/elgamal"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/s2k"
 	"io"
 	"io/ioutil"
 	"math/big"

+ 2 - 2
openpgp/packet/public_key.go

@@ -6,8 +6,6 @@ package packet
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp/elgamal"
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"crypto"
 	"crypto/dsa"
 	"crypto/ecdsa"
@@ -18,6 +16,8 @@ import (
 	_ "crypto/sha512"
 	"encoding/binary"
 	"fmt"
+	"golang.org/x/crypto/openpgp/elgamal"
+	"golang.org/x/crypto/openpgp/errors"
 	"hash"
 	"io"
 	"math/big"

+ 1 - 1
openpgp/packet/public_key_v3.go

@@ -16,7 +16,7 @@ import (
 	"strconv"
 	"time"
 
-	"code.google.com/p/go.crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/errors"
 )
 
 // PublicKeyV3 represents older, version 3 public keys. These keys are less secure and

+ 1 - 1
openpgp/packet/reader.go

@@ -5,7 +5,7 @@
 package packet
 
 import (
-	"code.google.com/p/go.crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 )
 

+ 2 - 2
openpgp/packet/signature.go

@@ -5,12 +5,12 @@
 package packet
 
 import (
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/s2k"
 	"crypto"
 	"crypto/dsa"
 	"crypto/rsa"
 	"encoding/binary"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/s2k"
 	"hash"
 	"io"
 	"strconv"

+ 2 - 2
openpgp/packet/signature_v3.go

@@ -12,8 +12,8 @@ import (
 	"strconv"
 	"time"
 
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/s2k"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/s2k"
 )
 
 // SignatureV3 represents older version 3 signatures. These signatures are less secure

+ 1 - 1
openpgp/packet/signature_v3_test.go

@@ -12,7 +12,7 @@ import (
 	"io/ioutil"
 	"testing"
 
-	"code.google.com/p/go.crypto/openpgp/armor"
+	"golang.org/x/crypto/openpgp/armor"
 )
 
 func TestSignatureV3Read(t *testing.T) {

+ 2 - 2
openpgp/packet/symmetric_key_encrypted.go

@@ -10,8 +10,8 @@ import (
 	"io"
 	"strconv"
 
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/s2k"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/s2k"
 )
 
 // This is the largest session key that we'll support. Since no 512-bit cipher

+ 1 - 1
openpgp/packet/symmetrically_encrypted.go

@@ -5,10 +5,10 @@
 package packet
 
 import (
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"crypto/cipher"
 	"crypto/sha1"
 	"crypto/subtle"
+	"golang.org/x/crypto/openpgp/errors"
 	"hash"
 	"io"
 	"strconv"

+ 1 - 1
openpgp/packet/symmetrically_encrypted_test.go

@@ -6,9 +6,9 @@ package packet
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp/errors"
 	"crypto/sha1"
 	"encoding/hex"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 	"io/ioutil"
 	"testing"

+ 3 - 3
openpgp/read.go

@@ -6,11 +6,11 @@
 package openpgp
 
 import (
-	"code.google.com/p/go.crypto/openpgp/armor"
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/packet"
 	"crypto"
 	_ "crypto/sha256"
+	"golang.org/x/crypto/openpgp/armor"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/packet"
 	"hash"
 	"io"
 	"strconv"

+ 1 - 1
openpgp/read_test.go

@@ -6,9 +6,9 @@ package openpgp
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/openpgp/errors"
 	_ "crypto/sha512"
 	"encoding/hex"
+	"golang.org/x/crypto/openpgp/errors"
 	"io"
 	"io/ioutil"
 	"strings"

+ 1 - 1
openpgp/s2k/s2k.go

@@ -12,7 +12,7 @@ import (
 	"io"
 	"strconv"
 
-	"code.google.com/p/go.crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/errors"
 )
 
 // Config collects configuration parameters for s2k key-stretching

+ 1 - 1
openpgp/s2k/s2k_test.go

@@ -15,7 +15,7 @@ import (
 	"encoding/hex"
 	"testing"
 
-	_ "code.google.com/p/go.crypto/ripemd160"
+	_ "golang.org/x/crypto/ripemd160"
 )
 
 var saltedTests = []struct {

+ 4 - 4
openpgp/write.go

@@ -5,11 +5,11 @@
 package openpgp
 
 import (
-	"code.google.com/p/go.crypto/openpgp/armor"
-	"code.google.com/p/go.crypto/openpgp/errors"
-	"code.google.com/p/go.crypto/openpgp/packet"
-	"code.google.com/p/go.crypto/openpgp/s2k"
 	"crypto"
+	"golang.org/x/crypto/openpgp/armor"
+	"golang.org/x/crypto/openpgp/errors"
+	"golang.org/x/crypto/openpgp/packet"
+	"golang.org/x/crypto/openpgp/s2k"
 	"hash"
 	"io"
 	"strconv"

+ 1 - 1
salsa20/salsa20.go

@@ -24,7 +24,7 @@ package salsa20
 // TODO(agl): implement XORKeyStream12 and XORKeyStream8 - the reduced round variants of Salsa20.
 
 import (
-	"code.google.com/p/go.crypto/salsa20/salsa"
+	"golang.org/x/crypto/salsa20/salsa"
 )
 
 // XORKeyStream crypts bytes from in to out using the given key and nonce. In

+ 1 - 1
scrypt/scrypt.go

@@ -11,7 +11,7 @@ import (
 	"crypto/sha256"
 	"errors"
 
-	"code.google.com/p/go.crypto/pbkdf2"
+	"golang.org/x/crypto/pbkdf2"
 )
 
 const maxInt = int(^uint(0) >> 1)

+ 1 - 1
ssh/agent/client.go

@@ -24,7 +24,7 @@ import (
 	"math/big"
 	"sync"
 
-	"code.google.com/p/go.crypto/ssh"
+	"golang.org/x/crypto/ssh"
 )
 
 // Agent represents the capabilities of an ssh-agent.

+ 1 - 1
ssh/agent/client_test.go

@@ -15,7 +15,7 @@ import (
 	"strconv"
 	"testing"
 
-	"code.google.com/p/go.crypto/ssh"
+	"golang.org/x/crypto/ssh"
 )
 
 // startAgent executes ssh-agent, and returns a Agent interface to it.

+ 1 - 1
ssh/agent/forward.go

@@ -10,7 +10,7 @@ import (
 	"net"
 	"sync"
 
-	"code.google.com/p/go.crypto/ssh"
+	"golang.org/x/crypto/ssh"
 )
 
 // RequestAgentForwarding sets up agent forwarding for the session.

+ 1 - 1
ssh/agent/keyring.go

@@ -12,7 +12,7 @@ import (
 	"fmt"
 	"sync"
 
-	"code.google.com/p/go.crypto/ssh"
+	"golang.org/x/crypto/ssh"
 )
 
 type privKey struct {

+ 1 - 1
ssh/agent/server.go

@@ -12,7 +12,7 @@ import (
 	"log"
 	"math/big"
 
-	"code.google.com/p/go.crypto/ssh"
+	"golang.org/x/crypto/ssh"
 )
 
 // Server wraps an Agent and uses it to implement the agent side of

+ 1 - 1
ssh/agent/server_test.go

@@ -7,7 +7,7 @@ package agent
 import (
 	"testing"
 
-	"code.google.com/p/go.crypto/ssh"
+	"golang.org/x/crypto/ssh"
 )
 
 func TestServer(t *testing.T) {

+ 2 - 2
ssh/agent/testdata_test.go

@@ -12,8 +12,8 @@ import (
 	"crypto/rand"
 	"fmt"
 
-	"code.google.com/p/go.crypto/ssh"
-	"code.google.com/p/go.crypto/ssh/testdata"
+	"golang.org/x/crypto/ssh"
+	"golang.org/x/crypto/ssh/testdata"
 )
 
 var (

+ 1 - 1
ssh/example_test.go

@@ -12,7 +12,7 @@ import (
 	"net"
 	"net/http"
 
-	"code.google.com/p/go.crypto/ssh/terminal"
+	"golang.org/x/crypto/ssh/terminal"
 )
 
 func ExampleNewServerConn() {

+ 1 - 1
ssh/keys_test.go

@@ -17,7 +17,7 @@ import (
 	"strings"
 	"testing"
 
-	"code.google.com/p/go.crypto/ssh/testdata"
+	"golang.org/x/crypto/ssh/testdata"
 )
 
 func rawKey(pub PublicKey) interface{} {

+ 1 - 1
ssh/session_test.go

@@ -14,7 +14,7 @@ import (
 	"math/rand"
 	"testing"
 
-	"code.google.com/p/go.crypto/ssh/terminal"
+	"golang.org/x/crypto/ssh/terminal"
 )
 
 type serverType func(Channel, <-chan *Request, *testing.T)

+ 2 - 2
ssh/test/agent_unix_test.go

@@ -10,8 +10,8 @@ import (
 	"bytes"
 	"testing"
 
-	"code.google.com/p/go.crypto/ssh"
-	"code.google.com/p/go.crypto/ssh/agent"
+	"golang.org/x/crypto/ssh"
+	"golang.org/x/crypto/ssh/agent"
 )
 
 func TestAgentForward(t *testing.T) {

+ 1 - 1
ssh/test/cert_test.go

@@ -10,7 +10,7 @@ import (
 	"crypto/rand"
 	"testing"
 
-	"code.google.com/p/go.crypto/ssh"
+	"golang.org/x/crypto/ssh"
 )
 
 func TestCertLogin(t *testing.T) {

+ 1 - 1
ssh/test/session_test.go

@@ -10,8 +10,8 @@ package test
 
 import (
 	"bytes"
-	"code.google.com/p/go.crypto/ssh"
 	"errors"
+	"golang.org/x/crypto/ssh"
 	"io"
 	"strings"
 	"testing"

+ 2 - 2
ssh/test/test_unix_test.go

@@ -21,8 +21,8 @@ import (
 	"testing"
 	"text/template"
 
-	"code.google.com/p/go.crypto/ssh"
-	"code.google.com/p/go.crypto/ssh/testdata"
+	"golang.org/x/crypto/ssh"
+	"golang.org/x/crypto/ssh/testdata"
 )
 
 const sshd_config = `

+ 2 - 2
ssh/test/testdata_test.go

@@ -12,8 +12,8 @@ import (
 	"crypto/rand"
 	"fmt"
 
-	"code.google.com/p/go.crypto/ssh"
-	"code.google.com/p/go.crypto/ssh/testdata"
+	"golang.org/x/crypto/ssh"
+	"golang.org/x/crypto/ssh/testdata"
 )
 
 var (

+ 1 - 1
ssh/testdata_test.go

@@ -12,7 +12,7 @@ import (
 	"crypto/rand"
 	"fmt"
 
-	"code.google.com/p/go.crypto/ssh/testdata"
+	"golang.org/x/crypto/ssh/testdata"
 )
 
 var (