1

I am trying to use elasticsearch-certutil to generate a certificate

sudo /usr/share/elasticsearch/bin/elasticsearch-certutil cert -out /usr/share/elasticsearch/config/elastic-certificates.p12 -pass ""

I am getting the following error:

java.security.KeyStoreException: Key protection  algorithm not found: java.security.UnrecoverableKeyException: Encrypt Private Key failed: unrecognized algorithm name: PBEWithSHA1AndDESede

I have seen this post which recommend downgrading Java version, but I don't know how to do this?

The other suggestion is to edit: sun.security.pkcs12.PKCS12KeyStore and add the following:

keystore.pkcs12.keyProtectionAlgorithm=PBEWithSHA512AndAES_256

But again I am not sure how to do this?

This is how I installed Java on my Ubuntu server:

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-jre

and this is my Java version: /usr/lib/jvm/java-1.8.0-openjdk-amd64

Hooman Bahreini
  • 518
  • 1
  • 8
  • 24

0 Answers0