# Configuring SSL over http

**URL:** <https://discuss.elastic.co/t/configuring-ssl-over-http/294883>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 19, 2022, 11:09pm UTC](https://discuss.elastic.co/t/configuring-ssl-over-http/294883 "2022-01-19T23:09:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayjayp2](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jayjayp2](https://discuss.elastic.co/u/jayjayp2)\
**Post date:** [January 19, 2022, 11:09pm UTC](https://discuss.elastic.co/t/configuring-ssl-over-http/294883/1 "2022-01-19T23:09:50Z")

</div>

Hi,

I'm new to Elasticsearch. I couldn't find an existing post. I'm trying to setup ssl over http. I have a .p12 file that is trusted over our network. I set:

```auto
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: myKey.p12

```

I then ran:

```auto

./bin/elasticsearch-keystore add xpack.security.http.ssl.keystore.secure_password

```

When I start Elasticsearch I get the following error:

[2022-01-19T16:37:16,560][WARN][stderr] [node-1] ElasticsearchSecurityException[failed to load SSL configuration [xpack.security.http.ssl]]; nested: ElasticsearchException[failed to initialize SSL TrustManager]; nested: IOException[keystore password was incorrect]; nested: UnrecoverableKeyException[failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.];  
[2022-01-19T16:37:16,560][WARN][stderr] [node-1] Likely root cause: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.

Elasticsearch is installed on Windows Server 2012 R2.

Is there anything else I need to set in the yaml file? Can this be an issue with Windows Server 2012 R2? The cert is using AES128 so I though it would be fine on Windows Server 2012 R2.

Thanks in advance.

Jason

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 16, 2022, 11:10pm UTC](https://discuss.elastic.co/t/configuring-ssl-over-http/294883/2 "2022-02-16T23:10:19Z")

</div>

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