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.
To use client certificates, specify global configuration options 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.
To load a certificate and a key from local files, use the builtin open(...) function:
To load the certificate and key from embedded strings, use this snippet. Note the use of template literals for multi-line strings):
They're not real and were never used anywhere.