shim: support -min-version and -max-version

Required for test case RSA-PSS-Default-Sign which is currently the only
test that fails with tls-tris.
This commit is contained in:
Peter Wu 2017-09-06 15:33:03 +01:00 committed by Filippo Valsorda
parent 8d196e3081
commit 3e19fa2ef1

View File

@ -19,6 +19,8 @@ func main() {
keyFile = fs.String("key-file", "", "")
certFile = fs.String("cert-file", "", "")
resumeCount = fs.Int("resume-count", 0, "")
minVersion = fs.Int("min-version", tls.VersionSSL30, "")
maxVersion = fs.Int("max-version", tls.VersionTLS13, "")
)
fmt.Println("Args:", os.Args[1:])
@ -39,8 +41,8 @@ func main() {
}
config := &tls.Config{
MinVersion: tls.VersionSSL30,
MaxVersion: tls.VersionTLS13,
MinVersion: uint16(*minVersion),
MaxVersion: uint16(*maxVersion),
InsecureSkipVerify: true,
}