No results for

Powered byAlgolia

Transport Layer Security (TLS)

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