ERRO[0001] could not initialize '.\Basic_xxxx_POSTTLS.js': could not load JS test 'file:///C:/K6DemoProject/Basic_abcdefgh_POSTTLS.js': tls: failed to find any PEM data in certificate input

Hi ,

Trying to hit an API that needs encrypted TLS certificate which is in pfx format.

Is there any way to do it.

Thanks for any help

My code
import http from ‘k6/http’;
import { check, sleep } from ‘k6’;

export const options = {
tlsAuth: [
domains: [‘’],
cert: open(‘./nmopqrst.pfx’),
key: open(‘./password.txt’),
vus: 1,
iterations: 1

export default function () {
const url = ‘’;
const body = {
grant_type: ‘client_credentials’,
scope: ‘accounts payments fundsconfirmations’,
client_id: ‘0c790dcf81501e47952afa84b79014e9ecb16614b7b3e1d69ddb7a8389debeb6’,

const params = {
headers: {
‘Content-Type’: ‘application/x-www-form-urlencoded’

Hi @subp :wave:

I think k6 does not support the pfx certificate format at the moment. Could you create a feature request GitHub issue on our repository so it’s on our radar? :bowing_man: