]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.boringcrypto] crypto: move crypto/internal/boring imports to reduce merge conflicts
authorFilippo Valsorda <filippo@golang.org>
Fri, 7 Jun 2019 17:48:42 +0000 (13:48 -0400)
committerFilippo Valsorda <filippo@golang.org>
Sun, 9 Jun 2019 19:24:48 +0000 (19:24 +0000)
As suggested by dmitshur@, move them to their own block so they don't
conflict with changes in the upstream imports.

Change-Id: Id46fb7c766066c406023b0355f4c3c860166f0fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/181277
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
16 files changed:
src/crypto/aes/cipher.go
src/crypto/aes/cipher_asm.go
src/crypto/ecdsa/ecdsa.go
src/crypto/hmac/hmac.go
src/crypto/rand/rand_unix.go
src/crypto/rsa/pkcs1v15.go
src/crypto/rsa/pss.go
src/crypto/rsa/rsa.go
src/crypto/rsa/rsa_test.go
src/crypto/sha1/sha1_test.go
src/crypto/sha256/sha256.go
src/crypto/sha256/sha256_test.go
src/crypto/sha512/sha512.go
src/crypto/sha512/sha512_test.go
src/crypto/tls/cipher_suites.go
src/crypto/tls/common.go

index db0ee38b78cea57e44cff31868025a58cfcff7e3..29d01796eb398fe5842e5696f933b0f91b8a35c9 100644 (file)
@@ -6,11 +6,12 @@ package aes
 
 import (
        "crypto/cipher"
-       "crypto/internal/boring"
        "crypto/internal/subtle"
        "strconv"
 )
 
+import "crypto/internal/boring"
+
 // The AES block size in bytes.
 const BlockSize = 16
 
index 93b963b2855c2f68ba1fc5a95f97b7f6069df7e7..4936699481f9ebbefb542b8b17a9ee774f9db557 100644 (file)
@@ -8,11 +8,12 @@ package aes
 
 import (
        "crypto/cipher"
-       "crypto/internal/boring"
        "crypto/internal/subtle"
        "internal/cpu"
 )
 
+import "crypto/internal/boring"
+
 // defined in asm_*.s
 
 //go:noescape
index db139dacb0a564f6da7f76ae3716e352a336c909..0e6bb8b23fc4679a0b249f4e86374c5533888bf5 100644 (file)
@@ -21,17 +21,20 @@ import (
        "crypto/aes"
        "crypto/cipher"
        "crypto/elliptic"
-       "crypto/internal/boring"
        "crypto/sha512"
        "encoding/asn1"
        "errors"
        "io"
        "math/big"
-       "unsafe"
 
        "crypto/internal/randutil"
 )
 
+import (
+       "crypto/internal/boring"
+       "unsafe"
+)
+
 // A invertible implements fast inverse mod Curve.Params().N
 type invertible interface {
        // Inverse returns the inverse of k in GF(P)
index d9f0bd24ea83893ec4e6eb5efb5c2c2d0703bee7..52885b07608f9b9a6d4cf89b653c88cdc19a45e9 100644 (file)
@@ -22,11 +22,12 @@ timing side-channels:
 package hmac
 
 import (
-       "crypto/internal/boring"
        "crypto/subtle"
        "hash"
 )
 
+import "crypto/internal/boring"
+
 // FIPS 198-1:
 // https://csrc.nist.gov/publications/fips/fips198-1/FIPS-198-1_final.pdf
 
index 80c8eaf97b38dc08870d71e980f4087fcec52bb5..246639702e9aad2532e8c14e9ec10015a3b6be75 100644 (file)
@@ -13,7 +13,6 @@ import (
        "bufio"
        "crypto/aes"
        "crypto/cipher"
-       "crypto/internal/boring"
        "encoding/binary"
        "io"
        "os"
@@ -23,6 +22,8 @@ import (
        "time"
 )
 
+import "crypto/internal/boring"
+
 const urandomDevice = "/dev/urandom"
 
 // Easy implementation: read from /dev/urandom.
index 5a0e9e2fb51fb86df54317ab1cdfb6b6138a0afa..6bd16f529daaef5d76ad52c1c4878c20781a9d60 100644 (file)
@@ -6,7 +6,6 @@ package rsa
 
 import (
        "crypto"
-       "crypto/internal/boring"
        "crypto/subtle"
        "errors"
        "io"
@@ -15,6 +14,8 @@ import (
        "crypto/internal/randutil"
 )
 
+import "crypto/internal/boring"
+
 // This file implements encryption and decryption using PKCS#1 v1.5 padding.
 
 // PKCS1v15DecrypterOpts is for passing options to PKCS#1 v1.5 decryption using
index 89f850ed0f976a001fa9704a903f764dc348e70e..e32cb7e0a729abb1b0e3b4e6519b6778a19afb95 100644 (file)
@@ -11,13 +11,14 @@ package rsa
 import (
        "bytes"
        "crypto"
-       "crypto/internal/boring"
        "errors"
        "hash"
        "io"
        "math/big"
 )
 
+import "crypto/internal/boring"
+
 func emsaPSSEncode(mHash []byte, emBits int, salt []byte, hash hash.Hash) ([]byte, error) {
        // See [1], section 9.1.1
        hLen := hash.Size()
index 755bd6d5dc848e48647fa8ca19b364c98bac4429..f43eb0b4d34ce009c7b209c4fc2acfc4759ca72d 100644 (file)
@@ -24,7 +24,6 @@ package rsa
 
 import (
        "crypto"
-       "crypto/internal/boring"
        "crypto/rand"
        "crypto/subtle"
        "errors"
@@ -32,11 +31,15 @@ import (
        "io"
        "math"
        "math/big"
-       "unsafe"
 
        "crypto/internal/randutil"
 )
 
+import (
+       "crypto/internal/boring"
+       "unsafe"
+)
+
 var bigZero = big.NewInt(0)
 var bigOne = big.NewInt(1)
 
index 3abe88a27d0c6142f3fd179263e6353003e5363e..766d9a954f8d13f721f786372016990ade2d2a5a 100644 (file)
@@ -7,7 +7,6 @@ package rsa
 import (
        "bytes"
        "crypto"
-       "crypto/internal/boring"
        "crypto/rand"
        "crypto/sha1"
        "crypto/sha256"
@@ -16,6 +15,8 @@ import (
        "testing"
 )
 
+import "crypto/internal/boring"
+
 func TestKeyGeneration(t *testing.T) {
        for _, size := range []int{128, 1024, 2048, 3072} {
                priv, err := GenerateKey(rand.Reader, size)
index 0ad7040b1945ce8a47a0e15f98c7433ae473f7f9..8e7a3d339cf5228030516cbcc67d367304f28bcb 100644 (file)
@@ -8,7 +8,6 @@ package sha1
 
 import (
        "bytes"
-       "crypto/internal/boring"
        "crypto/rand"
        "encoding"
        "fmt"
@@ -17,6 +16,8 @@ import (
        "testing"
 )
 
+import "crypto/internal/boring"
+
 type sha1Test struct {
        out       string
        in        string
index faf29f25adb6f05c2346213de7e8516e6d51bd3a..8b54a427d7d4c8c25cd650fe2703a8cbae0c4306 100644 (file)
@@ -8,12 +8,13 @@ package sha256
 
 import (
        "crypto"
-       "crypto/internal/boring"
        "encoding/binary"
        "errors"
        "hash"
 )
 
+import "crypto/internal/boring"
+
 func init() {
        crypto.RegisterHash(crypto.SHA224, New224)
        crypto.RegisterHash(crypto.SHA256, New)
index 688bad500102cd29ee4e777fe5b71346eb6ba368..13178fb21f5ed44cfe5bc595de25d1960413901d 100644 (file)
@@ -8,7 +8,6 @@ package sha256
 
 import (
        "bytes"
-       "crypto/internal/boring"
        "crypto/rand"
        "encoding"
        "fmt"
@@ -17,6 +16,8 @@ import (
        "testing"
 )
 
+import "crypto/internal/boring"
+
 type sha256Test struct {
        out       string
        in        string
index 3fefd65c657b0b5a4413ab181b6a3c63ab64ca06..1a2cef317c34023325ac805c2365606f1e551fb6 100644 (file)
@@ -12,12 +12,13 @@ package sha512
 
 import (
        "crypto"
-       "crypto/internal/boring"
        "encoding/binary"
        "errors"
        "hash"
 )
 
+import "crypto/internal/boring"
+
 func init() {
        crypto.RegisterHash(crypto.SHA384, New384)
        crypto.RegisterHash(crypto.SHA512, New)
index f9213a8d3098ccb09b6661b931a1b42e647a3ecd..6964bef8f7f8ec6bfe9b09dd66d688a3dc2bdd21 100644 (file)
@@ -8,7 +8,6 @@ package sha512
 
 import (
        "bytes"
-       "crypto/internal/boring"
        "crypto/rand"
        "encoding"
        "encoding/hex"
@@ -18,6 +17,8 @@ import (
        "testing"
 )
 
+import "crypto/internal/boring"
+
 type sha512Test struct {
        out       string
        in        string
index 19b75f9d2dc69a79b0afdaf2c82426b07be28797..1febee40eed3a6c72f0321437c57414a21e9460c 100644 (file)
@@ -10,7 +10,6 @@ import (
        "crypto/cipher"
        "crypto/des"
        "crypto/hmac"
-       "crypto/internal/boring"
        "crypto/rc4"
        "crypto/sha1"
        "crypto/sha256"
@@ -19,6 +18,8 @@ import (
        "hash"
 )
 
+import "crypto/internal/boring"
+
 // a keyAgreement implements the client and server side of a TLS key agreement
 // protocol by generating and processing key exchange messages.
 type keyAgreement interface {
index 9d501eca4a27e621f3812040c3625612e3e2364a..396676328a7097400635348ac566e906398267c0 100644 (file)
@@ -7,7 +7,6 @@ package tls
 import (
        "container/list"
        "crypto"
-       "crypto/internal/boring"
        "crypto/rand"
        "crypto/sha512"
        "crypto/x509"
@@ -23,6 +22,8 @@ import (
        "time"
 )
 
+import "crypto/internal/boring"
+
 const (
        VersionSSL30 = 0x0300
        VersionTLS10 = 0x0301