使用 cf CLI 工作流配置 Bluemix Liberty 应用程序以将证书添加到 Liberty 信任库的步骤?

Steps to configure Bluemix Liberty application to add a certificate to the Liberty trust store using a cf CLI workflow?

我正在使用 cf CLI 将 spring 引导应用程序部署到 Bluemix。我收到一个错误 'RSA premaster secret error',如下所示:

我正在这样部署我的应用程序:

# Create a Liberty application in Blumemix.  
# Set APPNAME (below) to the name of the application.
APPNAME=<<theappname>>
cf login -u cf_username -p cf_password
cf push    $APPNAME -p build/libs/myapp.jar

我似乎需要将证书添加到信任库 - 执行此操作的额外步骤是什么?据我所知,我需要重新打包自由服务器才能执行此操作。

上面的代码片段概括了我对自由的全部了解,请在提供答案时考虑到这一点。例如,我看到一些答案建议我需要编辑 server.xml,但我没有这个文件,所以大概我需要从头开始创建它,或者以某种方式生成它?

我见过类似的问题,但我特别询问添加证书的工作流程是在我使用 cf CLI 工具时。

完成这项任务没有什么可做的,它需要几个步骤:

1) 确保 Liberty 和 Spring 应用程序在本地运行。以下数据将指导您确保正确设置 Liberty 和 Spring:

How to use Websphere liberty in spring boot application

http://www.adeveloperdiary.com/java/spring-boot/deploy-spring-boot-application-ibm-liberty-8-5/

2) 在 Liberty 中为您的应用程序配置安全性:

https://www.ibm.com/support/knowledgecenter/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/tsec_7add_signercert.html

3) 从 CF 命令行将打包的服务器部署到 Bluemix:

https://console.ng.bluemix.net/docs/runtimes/liberty/optionsForPushing.html