我已經實施了一個安全適配器,該安全適配器與Twitter進行對話以獲取OAuth。在本地MFP開發人員服務器中,向Twitter發送請求(將各個CA證書添加到本地keys.jks文件後)。 當Bluemix運行,它安裝在trustore.jks一些CA證書,但不幸的是,沒有完成(見下文)Bluemix上的truststore.jks中缺少CA證書
問:我怎樣才能將證書添加到truststore.jks?它位於Bluemix的本地文件系統中。 (在運行時設置下配置的keytore中添加的證書不會執行此技巧,因爲此密鑰庫未用於出站SSL)。
錯誤日誌:
App/0
[ERROR ] CWPKI0022E: SSL HANDSHAKE FAILURE: A signer with SubjectDN CN=api.twitter.com, OU=Twitter Security, O="Twitter, Inc.", L=San Francisco, ST=California, C=US was sent from the target host. The signer might need to be added to local trust store /home/vcap/app/wlp/usr/servers/mfp/resources/security/truststore.jks, located in SSL configuration alias defaultSSLConfig. The extended error message from the SSL handshake exception is: PKIX path building failed: java.security.cert.CertPathBuilderException: PKIXCertPathBuilderImpl could not build a valid CertPath.; internal cause is:
2016-09-21T20:33:00.614+0200
App/0
java.security.cert.CertPathValidatorException: The certificate issued by CN=DigiCert High Assurance EV Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US is not trusted; internal cause is:
2016-09-21T20:33:00.614+0200
App/0
java.security.cert.CertPathValidatorException: Certificate chaining error
2016-09-21T20:33:00.618+0200