无法识别的算法名称:PBEWithSHA1AndDESede

无法识别的算法名称:PBEWithSHA1AndDESede

我正在尝试使用 elasticsearch-certutil 生成证书

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

我收到以下错误:

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

我见过这个帖子建议降级 Java 版本,但我不知道该怎么做?

另一个建议编辑如下:sun.security.pkcs12.PKCS12KeyStore并添加以下内容:

keystore.pkcs12.keyProtectionAlgorithm=PBEWithSHA512AndAES_256

但我又不确定该如何做?

以下是我在 Ubuntu 服务器上安装 Java 的方法:

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

这是我的 Java 版本:/usr/lib/jvm/java-1.8.0-openjdk-amd64

相关内容