# Settings SSL/TLS setup with PKCS8 keys

**URL:** <https://discuss.elastic.co/t/settings-ssl-tls-setup-with-pkcs8-keys/127496>\
**Category:** Elasticsearch\
**Created:** [April 10, 2018, 1:56pm UTC](https://discuss.elastic.co/t/settings-ssl-tls-setup-with-pkcs8-keys/127496 "2018-04-10T13:56:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![souf\_el\_badraoui](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/souf_el_badraoui/32/47746_2.png) [@souf\_el\_badraoui](https://discuss.elastic.co/u/souf_el_badraoui)\
**Post date:** [April 10, 2018, 1:56pm UTC](https://discuss.elastic.co/t/settings-ssl-tls-setup-with-pkcs8-keys/127496/1 "2018-04-10T13:56:55Z")

</div>

Hi, I'm trying to set up SSL/TLS with x-pack and running into this on all nodes  
`Caused by: java.lang.IllegalArgumentException: parsed an unsupported object [PKCS8EncryptedPrivateKeyInfo]`  
My configuration elasticsearch.yml

```
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.key: /etc/elasticsearch/cert/elastic.key
xpack.security.transport.ssl.certificate: /etc/elasticsearch/cert/elastic.crt
xpack.security.transport.ssl.certificate_authorities: ["/etc/elasticsearch/cert/vaca.crt"]

```

Can you help me please !

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [April 10, 2018, 2:27pm UTC](https://discuss.elastic.co/t/settings-ssl-tls-setup-with-pkcs8-keys/127496/2 "2018-04-10T14:27:37Z")

</div>

Hello,

Your `elastic.key` is encrypted and encoded with PKCS#8. Unfortunately, we do not currently support PKCS#8 encoded encrypted (password protected) private keys. We support

- unencrypted PKCS#8 encoded private keys
- unencrypted PKCS#1 encoded (also known as OpenSSL format) keys
- encrypted(password protected) PKCS#1 encoded (also known as OpenSSL format) keys
- PKCS#12 keystores (possible password protected) that contain private keys and certificates

A workaround for now would be to convert your key to PKCS#1

`openssl rsa -des3 -in elastic.key -out elastic-pkcs1.key`

and follow the prompts from entering the password to protect the key. You can change the algorithm used for encrypting the key (`-des3` as in triple DES) to `-aes128` , `-aes192` or `-aes256` if you prefer.

---

<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:** [May 8, 2018, 2:27pm UTC](https://discuss.elastic.co/t/settings-ssl-tls-setup-with-pkcs8-keys/127496/3 "2018-05-08T14:27:57Z")

</div>

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