SSL configuration

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

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

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?

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?

Will do. Thanks

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/
See new ssl params in gatling.conf.

Cheers,

Stéphane

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?

Are the paths your specified in gatling.conf absolute?

yes they are

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

I don’t use env vars

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 :smiley: