RestTemplate with pem certificate

前端 未结 2 1410
星月不相逢
星月不相逢 2020-12-17 04:40

I have pem certificate with private key and server certificate. I can execute it using curl and all works ok.

curl -O -k --cert-type pem --cert mypem.pem url         


        
2条回答
  •  余生分开走
    2020-12-17 05:13

    You need to import the certificate in the java trust store.

    BTW pem and cer(t) files are the same, just a different name for the extension

    Additional links

    • https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html
    • Digital Certificate: How to import .cer file in to .truststore file using?

提交回复
热议问题