github.com/gidoBOSSftw5731/go/src@v0.0.0-20210226122457-d24b0edbf019/crypto/ecdsa/ecdsa_s390x_test.go (about)

     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  //go:build s390x
     6  // +build s390x
     7  
     8  package ecdsa
     9  
    10  import (
    11  	"crypto/elliptic"
    12  	"testing"
    13  )
    14  
    15  func 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, &params, name)
    29  		testSignAndVerify(t, &params, name)
    30  		testNonceSafety(t, &params, name)
    31  		testINDCCA(t, &params, name)
    32  		testNegativeInputs(t, &params, name)
    33  	}
    34  }