Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whether K6 supports TLS 1.3 ? #1061

Closed
hgkiller opened this issue Jun 27, 2019 · 2 comments · Fixed by #1084
Closed

Whether K6 supports TLS 1.3 ? #1061

hgkiller opened this issue Jun 27, 2019 · 2 comments · Fixed by #1084

Comments

@hgkiller
Copy link

No description provided.

@na--
Copy link
Member

na-- commented Jun 27, 2019

It does, but not by default. Judging by the Go tls documentation, you need to set the GODEBUG environment variable to contain tls13=1. I tried executing the following script:

import http from 'k6/http';
import { check } from 'k6';

export default function () {
    let resp = http.get("https://www.howsmyssl.com/a/check");
    check(resp, {
        "status is 200": (resp) => resp.status === 200,
        "tls 1.3": (resp) => resp.json().tls_version === "TLS 1.3",
    });
};

with k6 v0.24.0 by running GODEBUG=tls13=1 k6 run zt.js and that worked, but only because of the environment variable... It seems like in Go 1.13 (the next Go version that would probably be released in August), there won't be any need to use the environment variable (golang/go#30055), but maybe we'll opt-in before that...

@na--
Copy link
Member

na-- commented Jun 27, 2019

Whether we wait for Go 1.13 or do the os.Setenv("GODEBUG", os.Getenv("GODEBUG")+",tls13=1") hack, we'd also need to edit this file: https://github.com/loadimpact/k6/blob/2a2fe2cc665e0d2b818c4f3ca7ce4fc9a5821294/lib/tlsconfig_go1_8.go#L30-L43

To add explicit support for tls 1.3 in the k6 options like this:

export let options = {
    tlsVersion: {
        max: "tls1.3",
    }
};

And somewhat connected issues that we probably should fix at the same time: #1055, #904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants