【问题标题】:REST WebService with Spring Boot with SSL, but without a self signed certificate带有 SSL 的 Spring Boot 的 REST WebService,但没有自签名证书
【发布时间】:2021-02-09 08:55:30
【问题描述】:

我能够使用带有 SSL 的 Spring Boot 的 REST WebService,就像这里解释的那样:

https://medium.com/quick-code/spring-boot-how-to-secure-rest-api-with-https-54ec8f0e4796

但本文展示了如何生成自签名证书:

keytool -genkey -keyalg RSA -alias tutorial -keystore tutorial.jks -storepass password -validity 365 -keysize 4096 -storetype pkcs12

现在我有一个 CA 的证书,我有 3 个文件:

private.key
certificate.crt
ca_bundle.crt

如何配置服务以使用此 SSL 证书,而不是使用自签名证书?

任何帮助/建议将不胜感激

【问题讨论】:

    标签: spring-boot ssl


    【解决方案1】:

    您应该能够按照本文中强调的相同步骤进行操作,但您可以从您的证书生成密钥库,如下所示: keytool -import -alias myAlias -file certificate.crt -keystore keystore.p12 -storetype PKCS12 -storepass password

    【讨论】:

      猜你喜欢
      • 2021-03-17
      • 2015-06-18
      • 2018-07-07
      • 1970-01-01
      • 2017-10-30
      • 2019-10-17
      • 2010-09-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多