1// Copyright 2020 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// +build ignore_for_gccgo 6// +build s390x 7 8package ecdsa 9 10import ( 11 "crypto/elliptic" 12 "testing" 13) 14 15func TestNoAsm(t *testing.T) { 16 curves := [...]elliptic.Curve{ 17 elliptic.P256(), 18 elliptic.P384(), 19 elliptic.P521(), 20 } 21 22 for _, curve := range curves { 23 // override the name of the curve to stop the assembly path being taken 24 params := *curve.Params() 25 name := params.Name 26 params.Name = name + "_GENERIC_OVERRIDE" 27 28 testKeyGeneration(t, ¶ms, name) 29 testSignAndVerify(t, ¶ms, name) 30 testNonceSafety(t, ¶ms, name) 31 testINDCCA(t, ¶ms, name) 32 testNegativeInputs(t, ¶ms, name) 33 } 34} 35