No results for

Powered byAlgolia

Transport Layer Security (TLS)

suggest edits
tls-example.js
1import http from 'k6/http';
2import { check } from 'k6';
3
4export let options = {
5 tlsCipherSuites: [
6 'TLS_RSA_WITH_RC4_128_SHA',
7 'TLS_RSA_WITH_AES_128_GCM_SHA256',
8 ],
9 tlsVersion: {
10 min: 'ssl3.0',
11 max: 'tls1.2',
12 },
13};
14
15export default function () {
16 let res = http.get('https://sha256.badssl.com');
17 check(res, {
18 'is TLSv1.2': (r) => r.tls_version === http.TLS_1_2,
19 'is sha256 cipher suite': (r) =>
20 r.tls_cipher_suite === 'TLS_RSA_WITH_AES_128_GCM_SHA256',
21 });
22}