]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/crypto/sha256/sha256_test.go
[dev.boringcrypto] all: merge master into dev.boringcrypto
[gostls13.git] / src / crypto / sha256 / sha256_test.go
index 702aa0b371abb6d65b57c235479f7bcedcc14277..a762afc4d9e8ff6878ec0ed1202e36972d47e8eb 100644 (file)
@@ -16,6 +16,8 @@ import (
        "testing"
 )
 
+import "crypto/internal/boring"
+
 type sha256Test struct {
        out       string
        in        string
@@ -216,6 +218,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")
+       }
        gen, asm := New().(*digest), New().(*digest)
        buf := make([]byte, BlockSize*20) // arbitrary factor
        rand.Read(buf)
@@ -290,6 +295,9 @@ func TestLargeHashes(t *testing.T) {
 }
 
 func TestAllocations(t *testing.T) {
+       if boring.Enabled {
+               t.Skip("BoringCrypto doesn't allocate the same way as stdlib")
+       }
        in := []byte("hello, world!")
        out := make([]byte, 0, Size)
        h := New()