# SSL configuration

**URL:** <https://community.gatling.io/t/ssl-configuration/289>\
**Category:** Gatling (Open-Source)\
**Created:** [March 5, 2013, 3:19pm UTC](https://community.gatling.io/t/ssl-configuration/289 "2013-03-05T15:19:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricky\_Pritchett](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Ricky\_Pritchett](https://community.gatling.io/u/Ricky_Pritchett)\
**Post date:** [March 5, 2013, 3:19pm UTC](https://community.gatling.io/t/ssl-configuration/289/1 "2013-03-05T15:19:30Z")

</div>

I’m trying to connect to a https site. Where can the ssl configurations be set. i.e. client cert and truststore settings.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 5, 2013, 4:19pm UTC](https://community.gatling.io/t/ssl-configuration/289/2 "2013-03-05T16:19:58Z")

</div>

What’s your problem exactly? Can’t you use the default SSL configuration? Do you really need to force the SSLContext?

---

<div class="post-metadata">

**Author:** ![Ricky\_Pritchett](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Ricky\_Pritchett](https://community.gatling.io/u/Ricky_Pritchett)\
**Post date:** [March 5, 2013, 4:34pm UTC](https://community.gatling.io/t/ssl-configuration/289/3 "2013-03-05T16:34:24Z")

</div>

I need to define which keystore and truststore to use for the SSLContext. Is there a way to create a new or modify the existing SSLContext?

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 5, 2013, 5:14pm UTC](https://community.gatling.io/t/ssl-configuration/289/4 "2013-03-05T17:14:29Z")

</div>

Currently no: this can perfectly be set up on the HTTP client, but Gatling doesn’t expose it.  
Could you fill an issue and we’ll fix it for 1.4.4 by the end of the week, please?

---

<div class="post-metadata">

**Author:** ![Ricky\_Pritchett](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Ricky\_Pritchett](https://community.gatling.io/u/Ricky_Pritchett)\
**Post date:** [March 5, 2013, 5:19pm UTC](https://community.gatling.io/t/ssl-configuration/289/5 "2013-03-05T17:19:23Z")

</div>

Will do. Thanks

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 6, 2013, 6:51pm UTC](https://community.gatling.io/t/ssl-configuration/289/6 "2013-03-06T18:51:57Z")

</div>

I’ve pushed the fix.  
Could you try it out please? [http://repository-gatling.forge.cloudbees.com/snapshot/com/excilys/ebi/gatling/highcharts/gatling-charts-highcharts/1.4.4-SNAPSHOT/](http://repository-gatling.forge.cloudbees.com/snapshot/com/excilys/ebi/gatling/highcharts/gatling-charts-highcharts/1.4.4-SNAPSHOT/)  
See new ssl params in gatling.conf.

Cheers,

Stéphane

---

<div class="post-metadata">

**Author:** ![Gregory\_Bougeard](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@Gregory\_Bougeard](https://community.gatling.io/u/Gregory_Bougeard)\
**Post date:** [June 3, 2014, 9:06am UTC](https://community.gatling.io/t/ssl-configuration/289/7 "2014-06-03T09:06:58Z")

</div>

I have a problem in SSL configuration too.

I’m using 1.5.5 and in a maven project.  
I setted in a gatling.conf the following stuff :

akka.stdout-loglevel = “DEBUG”  
akka.log-config-on-start = on  
http {

ssl {  
trustStore {  
type = “jks”  
file = “/path/trust.jks”  
password = “pwd”  
#algorithm = “”  
}  
keyStore {  
type = “jks”  
file = “/path/keystore.jks”  
password = “pwd”  
#algorithm = “”  
}  
}

}

But when I launch a simulation i’m getting :

Simulation simulations.back.BackSimulation started…  
11:01:40.096 [New I/O worker #2][WARN][slf4j.scala:156] c.e.e.g.h.a.GatlingAsyncHandler - Request ‘request\_4’ failed  
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196) ~[na:1.7.0\_55]  
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268) ~[na:1.7.0\_55]  
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380) ~[na:1.7.0\_55]  
Wrapped by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385) ~[na:1.7.0\_55]  
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) ~[na:1.7.0\_55]  
at sun.security.validator.Validator.validate(Validator.java:260) ~[na:1.7.0\_55]  
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326) ~[na:1.7.0\_55]  
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:283) ~[na:1.7.0\_55]  
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:138) ~[na:1.7.0\_55]  
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1328) ~[na:1.7.0\_55]  
Wrapped by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem

As I don’t see the configuration logged at startup i’m wondering if the gatling.conf is well taken in account.

In my pom.xml I setted the following :

com.excilys.ebi.gatling gatling-maven-plugin ${gatling.version} src/main/resources/gatling.conf src/main/resources/data results

…

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [June 3, 2014, 9:09am UTC](https://community.gatling.io/t/ssl-configuration/289/8 "2014-06-03T09:09:01Z")

</div>

Are the paths your specified in gatling.conf absolute?

---

<div class="post-metadata">

**Author:** ![Gregory\_Bougeard](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@Gregory\_Bougeard](https://community.gatling.io/u/Gregory_Bougeard)\
**Post date:** [June 3, 2014, 9:12am UTC](https://community.gatling.io/t/ssl-configuration/289/9 "2014-06-03T09:12:45Z")

</div>

yes they are

---

<div class="post-metadata">

**Author:** ![Gregory\_Bougeard](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@Gregory\_Bougeard](https://community.gatling.io/u/Gregory_Bougeard)\
**Post date:** [June 3, 2014, 9:13am UTC](https://community.gatling.io/t/ssl-configuration/289/10 "2014-06-03T09:13:55Z")

</div>

trustore is my home and keystore somewhere in /etc/ …

I don’t use env vars

---

<div class="post-metadata">

**Author:** ![Gregory\_Bougeard](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@Gregory\_Bougeard](https://community.gatling.io/u/Gregory_Bougeard)\
**Post date:** [June 3, 2014, 10:44am UTC](https://community.gatling.io/t/ssl-configuration/289/11 "2014-06-03T10:44:14Z")

</div>

Eureka!

I finally found that in my gatling-maven-plugin conf there was something wrong  
src/main/resources/gatling.conf

should have been  
src/main/resources

No my gatling.conf is loaded and I have handshake failures 😃
