mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
vendor: delete github.com/codahale/aesnicheck in favor of cpuid (#2020)
This commit is contained in:
parent
3e00e18adc
commit
703cf7bf8b
9 changed files with 4 additions and 87 deletions
|
@ -23,7 +23,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/codahale/aesnicheck"
|
"github.com/klauspost/cpuid"
|
||||||
"github.com/mholt/caddy"
|
"github.com/mholt/caddy"
|
||||||
"github.com/xenolf/lego/acme"
|
"github.com/xenolf/lego/acme"
|
||||||
)
|
)
|
||||||
|
@ -505,7 +505,7 @@ var defaultCiphersNonAESNI = []uint16{
|
||||||
//
|
//
|
||||||
// See https://github.com/mholt/caddy/issues/1674
|
// See https://github.com/mholt/caddy/issues/1674
|
||||||
func getPreferredDefaultCiphers() []uint16 {
|
func getPreferredDefaultCiphers() []uint16 {
|
||||||
if aesnicheck.HasAESNI() {
|
if cpuid.CPU.AesNi() {
|
||||||
return defaultCiphers
|
return defaultCiphers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/codahale/aesnicheck"
|
"github.com/klauspost/cpuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConvertTLSConfigProtocolVersions(t *testing.T) {
|
func TestConvertTLSConfigProtocolVersions(t *testing.T) {
|
||||||
|
@ -98,7 +98,7 @@ func TestConvertTLSConfigCipherSuites(t *testing.T) {
|
||||||
|
|
||||||
func TestGetPreferredDefaultCiphers(t *testing.T) {
|
func TestGetPreferredDefaultCiphers(t *testing.T) {
|
||||||
expectedCiphers := defaultCiphers
|
expectedCiphers := defaultCiphers
|
||||||
if !aesnicheck.HasAESNI() {
|
if !cpuid.CPU.AesNi() {
|
||||||
expectedCiphers = defaultCiphersNonAESNI
|
expectedCiphers = defaultCiphersNonAESNI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
vendor/github.com/codahale/aesnicheck/LICENSE
generated
vendored
21
vendor/github.com/codahale/aesnicheck/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Coda Hale
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
9
vendor/github.com/codahale/aesnicheck/asm_amd64.s
generated
vendored
9
vendor/github.com/codahale/aesnicheck/asm_amd64.s
generated
vendored
|
@ -1,9 +0,0 @@
|
||||||
// func HasAESNI() bool
|
|
||||||
TEXT ·HasAESNI(SB),$0
|
|
||||||
XORQ AX, AX
|
|
||||||
INCL AX
|
|
||||||
CPUID
|
|
||||||
SHRQ $25, CX
|
|
||||||
ANDQ $1, CX
|
|
||||||
MOVB CX, ret+0(FP)
|
|
||||||
RET
|
|
6
vendor/github.com/codahale/aesnicheck/check_asm.go
generated
vendored
6
vendor/github.com/codahale/aesnicheck/check_asm.go
generated
vendored
|
@ -1,6 +0,0 @@
|
||||||
// +build amd64
|
|
||||||
|
|
||||||
package aesnicheck
|
|
||||||
|
|
||||||
// HasAESNI returns whether AES-NI is supported by the CPU.
|
|
||||||
func HasAESNI() bool
|
|
8
vendor/github.com/codahale/aesnicheck/check_generic.go
generated
vendored
8
vendor/github.com/codahale/aesnicheck/check_generic.go
generated
vendored
|
@ -1,8 +0,0 @@
|
||||||
// +build !amd64
|
|
||||||
|
|
||||||
package aesnicheck
|
|
||||||
|
|
||||||
// HasAESNI returns whether AES-NI is supported by the CPU.
|
|
||||||
func HasAESNI() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
22
vendor/github.com/codahale/aesnicheck/cmd/aesnicheck/aesnicheck.go
generated
vendored
22
vendor/github.com/codahale/aesnicheck/cmd/aesnicheck/aesnicheck.go
generated
vendored
|
@ -1,22 +0,0 @@
|
||||||
// Command aesnicheck queries the CPU for AES-NI support. If AES-NI is supported,
|
|
||||||
// aesnicheck will print "supported" and exit with a status of 0. If AES-NI is
|
|
||||||
// not supported, aesnicheck will print "unsupported" and exit with a status of
|
|
||||||
// -1.
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/codahale/aesnicheck"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
if aesnicheck.HasAESNI() {
|
|
||||||
fmt.Println("supported")
|
|
||||||
os.Exit(0)
|
|
||||||
} else {
|
|
||||||
fmt.Println("unsupported")
|
|
||||||
os.Exit(-1)
|
|
||||||
}
|
|
||||||
}
|
|
9
vendor/github.com/codahale/aesnicheck/docs.go
generated
vendored
9
vendor/github.com/codahale/aesnicheck/docs.go
generated
vendored
|
@ -1,9 +0,0 @@
|
||||||
// Package aesnicheck provides a simple check to see if crypto/aes is using
|
|
||||||
// AES-NI instructions or if the AES transform is being done in software. AES-NI
|
|
||||||
// is constant-time, which makes it impervious to cache-level timing attacks. For
|
|
||||||
// security-conscious deployments on public cloud infrastructure (Amazon EC2,
|
|
||||||
// Google Compute Engine, Microsoft Azure, etc.) this may be critical.
|
|
||||||
//
|
|
||||||
// See http://eprint.iacr.org/2014/248 for details on cross-VM timing attacks on
|
|
||||||
// AES keys.
|
|
||||||
package aesnicheck
|
|
8
vendor/manifest
vendored
8
vendor/manifest
vendored
|
@ -34,14 +34,6 @@
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"notests": true
|
"notests": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"importpath": "github.com/codahale/aesnicheck",
|
|
||||||
"repository": "https://github.com/codahale/aesnicheck",
|
|
||||||
"vcs": "git",
|
|
||||||
"revision": "349fcc471aaccc29cd074e1275f1a494323826cd",
|
|
||||||
"branch": "master",
|
|
||||||
"notests": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"importpath": "github.com/dustin/go-humanize",
|
"importpath": "github.com/dustin/go-humanize",
|
||||||
"repository": "https://github.com/dustin/go-humanize",
|
"repository": "https://github.com/dustin/go-humanize",
|
||||||
|
|
Loading…
Reference in a new issue