./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