stupidgcm: skip tests on Go 1.4 and older
Quoting from the patch: We compare against Go's built-in GCM implementation. Since stupidgcm only supports 128-bit IVs and Go only supports that from 1.5 onward, we cannot run these tests on older Go versions.
This commit is contained in:
parent
b4d45554f2
commit
906172938a
|
@ -7,11 +7,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Native Go crypto with 128-bit IVs is only supported on Go 1.5 and up
|
|
||||||
func TestCryptoCoreNewGo15(t *testing.T) {
|
func TestCryptoCoreNewGo15(t *testing.T) {
|
||||||
key := make([]byte, 32)
|
key := make([]byte, 32)
|
||||||
c := New(key, false, true)
|
c := New(key, false, true)
|
||||||
if c.IVLen != 12 {
|
if c.IVLen != 16 {
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
// +build go1.5
|
||||||
|
// = go 1.5 or higher
|
||||||
|
//
|
||||||
|
// We compare against Go's built-in GCM implementation. Since stupidgcm only
|
||||||
|
// supports 128-bit IVs and Go only supports that from 1.5 onward, we cannot
|
||||||
|
// run these tests on older Go versions.
|
||||||
|
|
||||||
package stupidgcm
|
package stupidgcm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in New Issue