2

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?

  • In fact, you need to pass client certificate, not CA certificate. If you have client certificate, then you certainly have private key. – Crypt32 Jan 27 '21 at 12:42
  • @Crypt32 thankyou for the response. let me explain what I am trying to achieve. I want to hit a request to an API and in its response I will be getting the certificate. Similarly another request will be executed for its private key. But for that I need to pass a CA certificate with it. Hope I was able to explain the scenario. – Murtaza Multan Jan 29 '21 at 06:51

0 Answers0