# Bypass ssl hostname verification

**URL:** https://community.gatling.io/t/bypass-ssl-hostname-verification/3404
**Category:** Gatling (Open-Source)
**Created:** [November 23, 2016, 8:24pm UTC](https://community.gatling.io/t/bypass-ssl-hostname-verification/3404 "2016-11-23T20:24:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Sebboh](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@Sebboh](https://community.gatling.io/u/Sebboh)
#### Post date: [November 23, 2016, 8:24pm UTC](https://community.gatling.io/t/bypass-ssl-hostname-verification/3404/1 "2016-11-23T20:24:46Z")

</div>

Hello,

On 2.2.3, my https scripts are raising a ‘j.n.ConnectException: General SSLEngine problem’ (same scripts are working fine in 2.2.2 tho’)

It looks like it is related to the hostname verification since I’ve got the following message in the log :  
“java.security.cert.CertificateException: No subject alternative DNS name matching [foo.bar.com](http://foo.bar.com) found.”

The acceptAnyCertificate option is activated in gatling.conf

Is there another option to activate now ?

Regards,

Sebboh.

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [November 24, 2016, 12:30pm UTC](https://community.gatling.io/t/bypass-ssl-hostname-verification/3404/2 "2016-11-24T12:30:59Z")

</div>

We’ll probably rename “acceptAnyCertificate”. It’s intended for supporting self-signed certificates, not accepting broken certificate deployments where the server uses a certificate that doesn’t match the hostname.  
As I get it (can’t check without accessing the website), you fall in the latter case.

---

<div class="post-metadata">

### Author: ![Sebboh](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@Sebboh](https://community.gatling.io/u/Sebboh)
#### Post date: [November 24, 2016, 3:29pm UTC](https://community.gatling.io/t/bypass-ssl-hostname-verification/3404/3 "2016-11-24T15:29:18Z")

</div>

ok but what’s weird is that it works fine in 2.2.2.  
Anyway, if acceptAnyCertificate is not designed to allow unmatching certifcate hostname, is there any other way to skip the hostname verification step ?

Sebboh.

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [November 24, 2016, 3:34pm UTC](https://community.gatling.io/t/bypass-ssl-hostname-verification/3404/4 "2016-11-24T15:34:06Z")

</div>

What are you doing exactly? Are you copying your prod certificate on your test platform?!

---

<div class="post-metadata">

### Author: ![Sebboh](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@Sebboh](https://community.gatling.io/u/Sebboh)
#### Post date: [November 28, 2016, 10:46am UTC](https://community.gatling.io/t/bypass-ssl-hostname-verification/3404/5 "2016-11-28T10:46:29Z")

</div>

Actually, the CN of the certificates used by our http servers refer to the loadbalancer’s dns which is in front of our apache servers (on which we are injecting). The thing is in our test platform the dns of the server hosting the loadbalancer does not correspond to the certificate hostname. That’s why we need to be able to skip the hostname verification part.

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [November 28, 2016, 11:43am UTC](https://community.gatling.io/t/bypass-ssl-hostname-verification/3404/6 "2016-11-28T11:43:24Z")

</div>

We’ll introduce in the next major release an option to disable HTTPS algorithm on the SSLEngine.  
In the meantime, you can deploy self signed certificates with proper CN.
