<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SSL/TLS on Grafana Labs</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/</link><description>Recent content in SSL/TLS on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/index.xml" rel="self" type="application/rss+xml"/><item><title>Online Certificate Status Protocol (OCSP)</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/online-certificate-status-protocol-ocsp/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/online-certificate-status-protocol-ocsp/</guid><content><![CDATA[&lt;h2 id=&#34;what-is-ocsp&#34;&gt;What is OCSP?&lt;/h2&gt;
&lt;p&gt;The Online Certificate Status Protocol (OCSP) lets web browsers and clients check the status of an issued TLS certificate with a Certificate Authority (CA), ensuring that the certificate has not been revoked.&lt;/p&gt;
&lt;p&gt;It exists different ways to check whether the certificate has been revoked.
Each way places the burden on different parties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The browser/client: talk to the CA (or through a CA–entrusted OCSP responder) with OCSP. One downside
with this approach is that the CA&amp;rsquo;s servers need to be available.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The browser vendor: maintain an up-to-date list of certificate revocations by talking to
the CAs (or through a CA–entrusted OCSP responder) and distributing this list to the browsers
running on users&amp;rsquo; machines.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The server side: the server handles the interaction with the CA (or through a CA–entrusted OCSP
responder), caching the results of the periodic updates and including a &amp;ldquo;stapled response&amp;rdquo;
(referred to as OCSP stapling) in the TLS connection setup with the browser/client.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;ocsp-with-k6&#34;&gt;OCSP with k6&lt;/h2&gt;
&lt;p&gt;k6 supports OCSP stapling.
The application can receive and parse a stapled response as part of the TLS connection setup.
The OCSP response information is available in the &lt;code&gt;ocsp.stapled_response&lt;/code&gt; property of the response object.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { check } from &amp;#39;k6&amp;#39;;

export default function () {
  const res = http.get(&amp;#39;https://stackoverflow.com&amp;#39;);
  check(res, {
    &amp;#39;is OCSP response good&amp;#39;: (r) =&amp;gt; r.ocsp.status === http.OCSP_STATUS_GOOD,
  });
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;properties-of-an-ocsp-object&#34;&gt;Properties of an OCSP object&lt;/h2&gt;
&lt;p&gt;The OCSP &lt;code&gt;ocsp&lt;/code&gt; object contains the following properties:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Key&lt;/th&gt;
              &lt;th&gt;Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;status&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;the status of the certificate, see possible values below&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;revocation_reason&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;the reason for revocation of the certificate (if that is the status), see possible values below&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;produced_at&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;number&lt;/td&gt;
              &lt;td&gt;number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when this OCSP stapled response was signed by the CA (or CA–entrusted OCSP responder)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;this_update&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;number&lt;/td&gt;
              &lt;td&gt;number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when the status being indicated was known to be correct&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;next_update&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;number&lt;/td&gt;
              &lt;td&gt;number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when this OCSP stapled response will be refreshed with CA (or by CA entrusted OCSP responder)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;revoked_at&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;number&lt;/td&gt;
              &lt;td&gt;number of milliseconds elapsed since 1 January 1970 00:00:00 UTC, representing the time when this certificate was revoked (if that is the status)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;possible-values-for-status&#34;&gt;Possible values for &lt;code&gt;status&lt;/code&gt;:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_STATUS_GOOD&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_STATUS_REVOKED&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_STATUS_UNKNOWN&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_STATUS_SERVER_FAILED&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;possible-values-for-revocation_reason&#34;&gt;Possible values for &lt;code&gt;revocation_reason&lt;/code&gt;:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_UNSPECIFIED&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_KEY_COMPROMISE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_CA_COMPROMISE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_AFFILIATION_CHANGED&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_SUPERSEDED&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_CESSATION_OF_OPERATION&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_CERTIFICATE_HOLD&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_REMOVE_FROM_CRL&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_PRIVILEGE_WITHDRAWN&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.OCSP_REASON_AA_COMPROMISE&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h2 id="what-is-ocsp">What is OCSP?&lt;/h2>
&lt;p>The Online Certificate Status Protocol (OCSP) lets web browsers and clients check the status of an issued TLS certificate with a Certificate Authority (CA), ensuring that the certificate has not been revoked.&lt;/p></description></item><item><title>SSL/TLS client certificates</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/ssl-tls-client-certificates/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/ssl-tls-client-certificates/</guid><content><![CDATA[&lt;h1 id=&#34;ssltls-client-certificates&#34;&gt;SSL/TLS client certificates&lt;/h1&gt;
&lt;p&gt;Discussion about TLS certificates is usually about how clients authenticate servers.
However, both TLS and k6 also support the reverse process, in which servers authenticate clients.&lt;/p&gt;
&lt;p&gt;To use client certificates, specify global 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/&#34;&gt;configuration options&lt;/a&gt; that tell k6 how to map a public certificate and private key to the domains they are valid for.
You can load the certificate and key from local files or embed them as strings in the script.&lt;/p&gt;
&lt;h2 id=&#34;loading-a-certificate-and-a-key-from-local-files&#34;&gt;Loading a certificate and a key from local files&lt;/h2&gt;
&lt;p&gt;To load a certificate and a key from local files, use the builtin &lt;code&gt;open(...)&lt;/code&gt; function:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;

export const options = {
  tlsAuth: [
    {
      domains: [&amp;#39;example.com&amp;#39;],
      cert: open(&amp;#39;./mycert.pem&amp;#39;),
      key: open(&amp;#39;./mycert-key.pem&amp;#39;),
    },
  ],
};

export default function () {
  http.get(&amp;#39;https://example.com/&amp;#39;);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;loading-certificate-and-key-from-embedded-strings&#34;&gt;Loading certificate and key from embedded strings&lt;/h2&gt;
&lt;p&gt;To load the certificate and key from embedded strings, use this snippet.
Note the use of
&lt;a href=&#34;https://developer.mozilla.org/en-US/Web/JavaScript/Reference/Template_literals&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;template literals&lt;/a&gt; for multi-line strings):&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;These are just example keys.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;

const CERT = `-----BEGIN CERTIFICATE-----
MIIFgTCCA2kCAQEwDQYJKoZIhvcNAQEFBQAwgYExCzAJBgNVBAYTAlNFMRcwFQYD
VQQIEw5TdG9ja2hvbG1zIExhbjESMBAGA1UEBxMJU3RvY2tob2xtMRcwFQYDVQQK
...
/n5QrTGhP51P9Q1THzRfn6cNCDwzSTMVEJr40QhuTJQWASe3miuFmZoG5ykmGqVm
fWQRiQyM330s9vTwFy14J2Bxe4px6cyy7rVXvYL2LvfA4L0T7/x1nUULw&amp;#43;Mpqun1
R3XRJWqGDjBKXr5q8VatdQO1QLgr
-----END CERTIFICATE-----`;

const KEY = `-----BEGIN RSA PRIVATE KEY-----
KsZVVI1FTX&amp;#43;F959vqu1S02T&amp;#43;R1JM29PkIfJILIXapKQfb0FWrALU5xpipdPYBWp7
j5iSp06/7H8ms87Uz9BrOA6rytoRSE0/wEe5WkWdBBgLLPpfOSWZsAA5RGCB2n&amp;#43;N
...
Dk&amp;#43;frzKuiErHFN7HOHAQannui4eLsY0ehYMByowgJIUGzIJyXR6O19hVhV7Py66u
X7/Jy01JXn83LuWdpaPAKU&amp;#43;B42BLP0IGXt5CocPms07HOdtJ/wm2zwHTyfjn9vu&amp;#43;
HO/dQr6a7DhRu2lLI9Sc983NwRqDKICZQQ/&amp;#43;gqWk8BgQZ1yI9O4AYkzywzAEk3py
-----END RSA PRIVATE KEY-----`;

export const options = {
  tlsAuth: [
    {
      domains: [&amp;#39;example.com&amp;#39;],
      cert: CERT,
      key: KEY,
    },
  ],
};

export default function () {
  http.get(&amp;#39;https://example.com/&amp;#39;);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="ssltls-client-certificates">SSL/TLS client certificates&lt;/h1>
&lt;p>Discussion about TLS certificates is usually about how clients authenticate servers.
However, both TLS and k6 also support the reverse process, in which servers authenticate clients.&lt;/p></description></item><item><title>SSL/TLS version and ciphers</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/ssl-tls-version-and-ciphers/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/using-k6/protocols/ssl-tls/ssl-tls-version-and-ciphers/</guid><content><![CDATA[&lt;h1 id=&#34;ssltls-version-and-ciphers&#34;&gt;SSL/TLS version and ciphers&lt;/h1&gt;
&lt;p&gt;To support testing specific client configurations, you can specify a version or range of versions of SSL/TLS that are allowed for a connection.
You can as also specify which cipher suites are allowed for that connection.&lt;/p&gt;
&lt;blockquote&gt;
&lt;h4 id=&#34;-reg-ciphers-and-tls-13&#34;&gt;⚠️ Reg. ciphers and TLS 1.3&lt;/h4&gt;
&lt;p&gt;Due to limitations in the underlying &lt;a href=&#34;https://github.com/golang/go/issues/29349&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;go implementation&lt;/a&gt;, changing the ciphers for TLS 1.3 is &lt;em&gt;not&lt;/em&gt; supported and will do nothing.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;limiting-ssltls-version&#34;&gt;Limiting SSL/TLS version&lt;/h2&gt;
&lt;p&gt;To limit the k6 to a specific SSL/TLS version, use a global

    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/&#34;&gt;configuration option&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;

export const options = {
  tlsVersion: http.TLS_1_2,
};

export default function () {
  http.get(&amp;#39;https://badssl.com&amp;#39;);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can also accept a range of SSL/TLS versions:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;

export const options = {
  tlsVersion: {
    min: http.SSL_3_0,
    max: http.TLS_1_2,
  },
};

export default function () {
  http.get(&amp;#39;https://badssl.com&amp;#39;);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;versions-available-to-choose-from&#34;&gt;Versions available to choose from&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s the list of available SSL/TLS versions that you can choose from, ordered from oldest version to latest.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;http.SSL_3_0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.TLS_1_0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.TLS_1_1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.TLS_1_2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;http.TLS_1_3&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;limiting-cipher-suites&#34;&gt;Limiting cipher suites&lt;/h2&gt;
&lt;p&gt;To limit the cipher suites that k6 is allowed to use, there&amp;rsquo;s a global

    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/&#34;&gt;configuration option&lt;/a&gt;.
You choose a list of allowed ciphers:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;

export const options = {
  tlsCipherSuites: [&amp;#39;TLS_RSA_WITH_RC4_128_SHA&amp;#39;, &amp;#39;TLS_RSA_WITH_AES_128_GCM_SHA256&amp;#39;],
};

export default function () {
  http.get(&amp;#39;https://badssl.com&amp;#39;);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;checking-ssltls-version-and-cipher-suite-used-in-requests&#34;&gt;Checking SSL/TLS version and cipher suite used in requests&lt;/h2&gt;
&lt;p&gt;You can also check which SSL/TLS version and ciphers were used.
To do so, look at the &lt;code&gt;tls_version&lt;/code&gt; and &lt;code&gt;tls_cipher_suite&lt;/code&gt; response object properties.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { check } from &amp;#39;k6&amp;#39;;

export default function () {
  const res = http.get(&amp;#39;https://sha256.badssl.com&amp;#39;);
  check(res, {
    &amp;#39;is TLSv1.2&amp;#39;: (r) =&amp;gt; r.tls_version === http.TLS_1_2,
    &amp;#39;is sha256 cipher suite&amp;#39;: (r) =&amp;gt; r.tls_cipher_suite === &amp;#39;TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256&amp;#39;,
  });
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;cipher-suites-available-to-choose-from&#34;&gt;Cipher suites available to choose from&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s a list of available SSL/TLS cipher suites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;TLS_RSA_WITH_RC4_128_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_RSA_WITH_3DES_EDE_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_RSA_WITH_AES_128_GCM_SHA256&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_RSA_WITH_AES_256_GCM_SHA384&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_ECDSA_WITH_RC4_128_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_RSA_WITH_RC4_128_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;h3 id=&#34;-differences-depending-on-k6-build&#34;&gt;⚠️ Differences depending on k6 build&lt;/h3&gt;
&lt;p&gt;This list reflects the available cipher suites in the latest official build.
If you are using a custom-built k6, the available cipher suites will depend on the Go version you compiled it with, see &lt;a href=&#34;https://golang.org/pkg/crypto/tls/#pkg-constants&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://golang.org/pkg/crypto/tls/#pkg-constants&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
]]></content><description>&lt;h1 id="ssltls-version-and-ciphers">SSL/TLS version and ciphers&lt;/h1>
&lt;p>To support testing specific client configurations, you can specify a version or range of versions of SSL/TLS that are allowed for a connection.
You can as also specify which cipher suites are allowed for that connection.&lt;/p></description></item></channel></rss>