mirror of
https://github.com/securego/gosec.git
synced 2025-01-12 04:45:53 +00:00
remove support for go 1.11 (#444)
This commit is contained in:
parent
d13bb6d242
commit
00363edac5
2 changed files with 1 additions and 32 deletions
|
@ -1,9 +1,9 @@
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- "1.11.x"
|
|
||||||
- "1.12.x"
|
- "1.12.x"
|
||||||
- "1.13.x"
|
- "1.13.x"
|
||||||
|
- "1.14.x"
|
||||||
- tip
|
- tip
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
// +build !go1.12
|
|
||||||
|
|
||||||
// This file can be removed once go1.11 is no longer supported
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/tls"
|
|
||||||
"sort"
|
|
||||||
)
|
|
||||||
|
|
||||||
func mapTLSVersions(tlsVersions []string) []int {
|
|
||||||
var versions []int
|
|
||||||
for _, tlsVersion := range tlsVersions {
|
|
||||||
switch tlsVersion {
|
|
||||||
case "TLSv1.2":
|
|
||||||
versions = append(versions, tls.VersionTLS12)
|
|
||||||
case "TLSv1.1":
|
|
||||||
versions = append(versions, tls.VersionTLS11)
|
|
||||||
case "TLSv1":
|
|
||||||
versions = append(versions, tls.VersionTLS10)
|
|
||||||
case "SSLv3":
|
|
||||||
// unsupported from go1.14
|
|
||||||
versions = append(versions, tls.VersionSSL30)
|
|
||||||
default:
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sort.Ints(versions)
|
|
||||||
return versions
|
|
||||||
}
|
|
Loading…
Reference in a new issue