mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 06:44:41 +00:00
421ecd32fc
* Add support for HTTP proxy listeners * Add customizable bootstrap configuration options * Debug logging for xDS AuthZ * Add Envoy Integration test suite with basic test coverage * Add envoy command tests to cover new cases * Add tracing integration test * Add gRPC support WIP * Merged changes from master Docker. get CI integration to work with same Dockerfile now * Make docker build optional for integration * Enable integration tests again! * http2 and grpc integration tests and fixes * Fix up command config tests * Store all container logs as artifacts in circle on fail * Add retries to outer part of stats measurements as we keep missing them in CI * Only dump logs on failing cases * Fix typos from code review * Review tidying and make tests pass again * Add debug logs to exec test. * Fix legit test failure caused by upstream rename in envoy config * Attempt to reduce cases of bad TLS handshake in CI integration tests * bring up the right service * Add prometheus integration test * Add test for denied AuthZ both HTTP and TCP * Try ANSI term for Circle
43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build s390x,go1.11,!gccgo,!appengine
|
|
|
|
package poly1305
|
|
|
|
import (
|
|
"golang.org/x/sys/cpu"
|
|
)
|
|
|
|
// poly1305vx is an assembly implementation of Poly1305 that uses vector
|
|
// instructions. It must only be called if the vector facility (vx) is
|
|
// available.
|
|
//go:noescape
|
|
func poly1305vx(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
|
|
|
|
// poly1305vmsl is an assembly implementation of Poly1305 that uses vector
|
|
// instructions, including VMSL. It must only be called if the vector facility (vx) is
|
|
// available and if VMSL is supported.
|
|
//go:noescape
|
|
func poly1305vmsl(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
|
|
|
|
// Sum generates an authenticator for m using a one-time key and puts the
|
|
// 16-byte result into out. Authenticating two different messages with the same
|
|
// key allows an attacker to forge messages at will.
|
|
func Sum(out *[16]byte, m []byte, key *[32]byte) {
|
|
if cpu.S390X.HasVX {
|
|
var mPtr *byte
|
|
if len(m) > 0 {
|
|
mPtr = &m[0]
|
|
}
|
|
if cpu.S390X.HasVXE && len(m) > 256 {
|
|
poly1305vmsl(out, mPtr, uint64(len(m)), key)
|
|
} else {
|
|
poly1305vx(out, mPtr, uint64(len(m)), key)
|
|
}
|
|
} else {
|
|
sumGeneric(out, m, key)
|
|
}
|
|
}
|