Quantcast
Channel: Grafana k6 - Grafana Labs Community Forums
Viewing all articles
Browse latest Browse all 431

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

$
0
0

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: [‘https://syst-obp-api.acdefgh.com’],
cert: open(‘./nmopqrst.pfx’),
key: open(‘./password.txt’),
},
],
vus: 1,
iterations: 1
};

export default function () {
const url = ‘https://syst-obp-api.ndtvRepublicTimesABP.com/syst-open-banking/private/oauth2/token’;
const body = {
grant_type: ‘client_credentials’,
scope: ‘accounts payments fundsconfirmations’,
client_id: ‘0c790dcf81501e47952afa84b79014e9ecb16614b7b3e1d69ddb7a8389debeb6’,

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

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 431

Trending Articles