]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/go/build/deps_test.go
all: REVERSE MERGE dev.boringcrypto (cdcb4b6) into master
[gostls13.git] / src / go / build / deps_test.go
index 8e24ca937b43ab3ee21117b4163645209942b4f0..8519b82059274b1e0e85e5e2fedffee2db9288c6 100644 (file)
@@ -392,9 +392,17 @@ var depsRules = `
        NET, log
        < net/mail;
 
+       NONE < crypto/internal/boring/sig, crypto/internal/boring/syso;
+       sync/atomic < crypto/internal/boring/fipstls;
+       crypto/internal/boring/sig, crypto/internal/boring/fipstls < crypto/tls/fipsonly;
+
        # CRYPTO is core crypto algorithms - no cgo, fmt, net.
        # Unfortunately, stuck with reflect via encoding/binary.
-       encoding/binary, golang.org/x/sys/cpu, hash
+       crypto/internal/boring/sig,
+       crypto/internal/boring/syso,
+       encoding/binary,
+       golang.org/x/sys/cpu,
+       hash
        < crypto
        < crypto/subtle
        < crypto/internal/subtle
@@ -403,6 +411,8 @@ var depsRules = `
        < crypto/ed25519/internal/edwards25519/field, golang.org/x/crypto/curve25519/internal/field
        < crypto/ed25519/internal/edwards25519
        < crypto/cipher
+       < crypto/internal/boring
+       < crypto/boring
        < crypto/aes, crypto/des, crypto/hmac, crypto/md5, crypto/rc4,
          crypto/sha1, crypto/sha256, crypto/sha512
        < CRYPTO;
@@ -411,6 +421,7 @@ var depsRules = `
 
        # CRYPTO-MATH is core bignum-based crypto - no cgo, net; fmt now ok.
        CRYPTO, FMT, math/big, embed
+       < crypto/internal/boring/bbig
        < crypto/internal/randutil
        < crypto/rand
        < crypto/ed25519
@@ -432,13 +443,15 @@ var depsRules = `
        < golang.org/x/crypto/chacha20poly1305
        < golang.org/x/crypto/hkdf
        < crypto/x509/internal/macos
-       < crypto/x509/pkix
+       < crypto/x509/pkix;
+
+       crypto/internal/boring/fipstls, crypto/x509/pkix
        < crypto/x509
        < crypto/tls;
 
        # crypto-aware packages
 
-       CRYPTO, DEBUG, go/build, go/types, text/scanner
+       DEBUG, go/build, go/types, text/scanner, crypto/md5
        < internal/pkgbits
        < go/internal/gcimporter, go/internal/gccgoimporter, go/internal/srcimporter
        < go/importer;
@@ -636,6 +649,9 @@ func findImports(pkg string) ([]string, error) {
        }
        var imports []string
        var haveImport = map[string]bool{}
+       if pkg == "crypto/internal/boring" {
+               haveImport["C"] = true // kludge: prevent C from appearing in crypto/internal/boring imports
+       }
        fset := token.NewFileSet()
        for _, file := range files {
                name := file.Name()