client certificate invalid keystore format

633 views
Skip to first unread message

Magnus Jensen

unread,
Mar 4, 2016, 7:35:38 AM3/4/16
to Gatling User Group


To access a webservice I need to add a certificate (I get the dialog above in the screenshot).

I have red the documentation on gatling.io and searched this forum, concluding that I need to add this certificate to my computer and then refer it from the gatling.conf togheter with the password like this:








 }
  keyStore
{
   
#type = ""      # Type of SSLContext's KeyManagers store
    file = "/Users/myname/Downloads/Sa_sslMun[KMD2015]_cli.p12"      # Location of SSLContext's KeyManagers store
    password = "I8S3K2SAJHV7SGXMFHNT"  # Password for SSLContext's KeyManagers store
    #algorithm = "" # Algorithm used SSLContext's KeyManagers store
  }
}

However, when running the simulation, I get an error:

Simulation magnus.FileUploadSimulation started...
Exception in thread "main" java.io.IOException: Invalid keystore format
    at sun
.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
    at sun
.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
    at java
.security.KeyStore.load(KeyStore.java:1433)
    at io
.gatling.http.util.SslHelper$$anonfun$newKeyManagers$1.apply(SslHelper.scala:53)
    at io
.gatling.http.util.SslHelper$$anonfun$newKeyManagers$1.apply(SslHelper.scala:50)

Do I need to type in the keystore "type" as well? Given the certificates name is "Sa_sslMun[KMD2015]_cli.p12" what should the type be?

Thanks!

adrian...@hushmail.com

unread,
Mar 4, 2016, 10:39:07 AM3/4/16
to gat...@googlegroups.com
Hi Magnus

This is my config

ssl {
keyStore {
type = "pkcs12"
file = "/etc/ssl/dev-cert.p12"
password = “password1”
}
trustStore {
type = ""
file = "/etc/ssl/jssecacerts"
password = “password2”
}
}

I know there was an issue with the reading of the cert config in earlier versions of the 2.2.0-SNAPSHOT which has now been fixed.
> sbt update

Aidy

On 3/4/2016 at 12:35 PM, "Magnus Jensen" <maj...@gmail.com> wrote:
>
><https://lh3.googleusercontent.com/-
>uFMWw4AjQHE/Vtl_0GcLAzI/AAAAAAAAASo/9Ojd4s0JjeI/s1600/Skjermbilde%2
>B2016-03-04%2Bkl.%2B13.28.27.png>
>--
>You received this message because you are subscribed to the Google
>Groups "Gatling User Group" group.
>To unsubscribe from this group and stop receiving emails from it,
>send an email to gatling+u...@googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages