K6 pass CA cert without password in http post request

Viewed 207

I am working on the load testing scenario where I need to pass the CA certificate in the post request. I am using K6 tool for the testing purpose using JavaScript.

The issue I am facing is that the CA certificate does not have any private key, and the only way I found from the documentation is using SSL/TLS client certificates.

It takes 3 parameters

  • Domain Name
  • Cert File
  • Key File

Code Sample

I want to request an API and in its response I will be getting the certificate. Similarly another request will be send for its private key. But for that I need to pass a CA certificate with the request.

So, Is there any way to pass the certificate without having the key file in K6?

0 Answers
Related