]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/crypto/sha1/sha1_test.go
[dev.boringcrypto] all: merge master (nearly Go 1.10 beta 1) into dev.boringcrypto
[gostls13.git] / src / crypto / sha1 / sha1_test.go
index 8fefde0db2dad470d82330837798dd2ac4762f2a..20095190c3efb1afb9db314d149a2315cadfd832 100644 (file)
@@ -8,6 +8,7 @@ package sha1
 
 import (
        "bytes"
+       "crypto/internal/boring"
        "crypto/rand"
        "encoding"
        "fmt"
@@ -76,6 +77,9 @@ func TestGolden(t *testing.T) {
                                io.WriteString(c, g.in[len(g.in)/2:])
                                sum = c.Sum(nil)
                        case 3:
+                               if boring.Enabled {
+                                       continue
+                               }
                                io.WriteString(c, g.in[0:len(g.in)/2])
                                c.(*digest).ConstantTimeSum(nil)
                                io.WriteString(c, g.in[len(g.in)/2:])
@@ -140,6 +144,9 @@ func TestBlockSize(t *testing.T) {
 
 // Tests that blockGeneric (pure Go) and block (in assembly for some architectures) match.
 func TestBlockGeneric(t *testing.T) {
+       if boring.Enabled {
+               t.Skip("BoringCrypto doesn't expose digest")
+       }
        for i := 1; i < 30; i++ { // arbitrary factor
                gen, asm := New().(*digest), New().(*digest)
                buf := make([]byte, BlockSize*i)