# How to pass SSL cert and key in Gatling Script

**URL:** <https://community.gatling.io/t/how-to-pass-ssl-cert-and-key-in-gatling-script/7505>\
**Category:** Gatling (Open-Source)\
**Created:** [January 11, 2023, 4:22am UTC](https://community.gatling.io/t/how-to-pass-ssl-cert-and-key-in-gatling-script/7505 "2023-01-11T04:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![learngatling2022](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@learngatling2022](https://community.gatling.io/u/learngatling2022)\
**Post date:** [January 11, 2023, 4:22am UTC](https://community.gatling.io/t/how-to-pass-ssl-cert-and-key-in-gatling-script/7505/1 "2023-01-11T04:22:04Z")

</div>

I have to create one script in gatling where I need to pass ssl CERT AND KEY.Curl is in below format.I am not sure how to pass it in my simulation .Can someone please help.

```auto
curl -E abc.crt --key cde.key --location --request POST 'https://a/b' \
--header 'Content-Type: application/json'

```

I tried to pass this cert and key in gatling.conf but its throwing me error " Invalid keystore format". while same thing is working fine in postman.

---

<div class="post-metadata">

**Author:** ![sbrevet](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/sbrevet/32/830_2.png) [@sbrevet](https://community.gatling.io/u/sbrevet)\
**Post date:** [January 11, 2023, 8:14am UTC](https://community.gatling.io/t/how-to-pass-ssl-cert-and-key-in-gatling-script/7505/2 "2023-01-11T08:14:41Z")

</div>

Hi @learngatling2022,

JVM does not take certificate and key directly. You’ll have to create a keystore.  
Plenty of articles on the internet are already present to explain you that.

Try creating a `JKS` or a `p12` from your certificate and key and configure that in your `gatling.conf` file.

Cheers!

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/b/b148e0742de35c6280726cabf3ecd3de2d320f63.png) [@system](https://community.gatling.io/u/system)\
**Post date:** [February 10, 2023, 8:15am UTC](https://community.gatling.io/t/how-to-pass-ssl-cert-and-key-in-gatling-script/7505/3 "2023-02-10T08:15:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
