我HTTPS
只想为我的应用程序设置。为此,我LetsEncrypt
用来生成我的证书并成为我的CA
.
LetsEncrypt 为我生成了这些文件:
root@myapp:/opt/letsencrypt# ll /etc/letsencrypt/live/myapp.company.coms/
total 8
drwxr-xr-x 2 root root 4096 Feb 19 15:46 ./
drwx------ 3 root root 4096 Feb 19 15:46 ../
lrwxrwxrwx 1 root root 47 Feb 19 15:46 cert.pem -> ../../archive/myapp.company.coms/cert1.pem
lrwxrwxrwx 1 root root 48 Feb 19 15:46 chain.pem -> ../../archive/myapp.company.coms/chain1.pem
lrwxrwxrwx 1 root root 52 Feb 19 15:46 fullchain.pem -> ../../archive/myapp.company.coms/fullchain1.pem
lrwxrwxrwx 1 root root 50 Feb 19 15:46 privkey.pem -> ../../archive/myapp.company.coms/privkey1.pem
阅读 Play 2 Framework 文档,他们这样说:
https.keyStore - The path to the keystore containing the private key and certificate, if not provided generates a keystore for you
https.keyStoreType - The key store type, defaults to JKS
https.keyStorePassword - The password, defaults to a blank password
https.keyStoreAlgorithm - The key store algorithm, defaults to the platforms default algorithm
使用这些属性的示例可能是:
./start -Dhttps.port=9443 -Dhttps.keyStore=/path/to/keystore -Dhttps.keyStorePassword=changeme
现在我有了 LetsEncrypt 生成的密钥和证书,如何生成我的密钥库以供 Play 2 Framework 使用?