aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/sha1/sha1_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/sha1/sha1_test.go')
-rw-r--r--src/crypto/sha1/sha1_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crypto/sha1/sha1_test.go b/src/crypto/sha1/sha1_test.go
index 681e928de2..8e7a3d339c 100644
--- a/src/crypto/sha1/sha1_test.go
+++ b/src/crypto/sha1/sha1_test.go
@@ -16,6 +16,8 @@ import (
"testing"
)
+import "crypto/internal/boring"
+
type sha1Test struct {
out string
in string
@@ -77,6 +79,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:])
@@ -141,6 +146,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)