单个.jks文件包含SAML应用程序的多个密钥存储

时间:2018-08-24 06:19:36

标签: spring-boot spring-security spring-saml spring-security-saml2

我的应用程序需要使用SAML连接到多个Idp提供程序,为此,我已经生成了多个.jks文件,它们具有自己的密钥别名和密码,但是我需要一个包含所有文件的单个.jks文件。有没有办法合并这些,我尝试了KeyStore -import但它不起作用 我在应用程序中使用Spring Security SAML扩展,它需要一个Single Key-manager对象指向单个.jks文件

1 个答案:

答案 0 :(得分:0)

您需要创建一个TrustStore。

keytool -import -trustcacerts -alias rootCert1 -file cert_1_location -keystore trusted-keystore.p12 -storetype pkcs12

同样,您可以在同一TrustStore中导入另一个证书:

keytool -import -trustcacerts -alias rootCert2 -file cert_2_location -keystore trusted-keystore.p12 -storetype pkcs12