trusted certificate entries are not password-protected Spring SAML

前端 未结 5 1416
无人及你
无人及你 2020-12-16 13:50

I have generated testIdp.cer file by copying 509 entry of the IDP I am planning to connect. Then I created JKS file by executing the following command

keytoo         


        
5条回答
  •  被撕碎了的回忆
    2020-12-16 14:24

    Vladimir answered correctly the question why the error occurs. In my answer I want to show how you can import a certificate to the keystore to solve that problem:

    You have to import the certificate and private key which could not be done directly by keytool.

    The detailed described solution is found here: https://stackoverflow.com/a/8224863/1909531

    Here's an excerpt:

    openssl pkcs12 -export -in server.crt -inkey server.key \
               -out server.p12 -name [some-alias] \
               -CAfile ca.crt -caname root
    
    keytool -importkeystore \
        -deststorepass [changeit] -destkeypass [changeit] -destkeystore server.keystore \
        -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass some-password \
        -alias [some-alias]
    

提交回复
热议问题