./bin/elasticsearch-certutil ca --pem # 生成一个名字叫做elastic-stack-ca.zip的文件
unzip elastic-stack-ca.zip
Archive: elastic-stack-ca.zip
creating: ca/
inflating: ca/ca.crt
inflating: ca/ca.key
###########
./bin/elasticsearch-certutil cert --ca-cert ./ca/ca.crt --ca-key ./ca/ca.key --pem --name localhost # 这个证书只能在当前的localhost中进行使用,生产一个叫做certificate-bundle.zip的文件
unzip certificate-bundle.zip
Archive: certificate-bundle.zip
creating: localhost/
inflating: localhost/localhost.crt
inflating: localhost/localhost.key
# 使用如下的命令把一个.crt的证书转换为一个.pem的证书
openssl x509 -in mycert.crt -out mycert.pem -outform PEM