【发布时间】:2015-08-04 22:36:01
【问题描述】:
我使用 RSA (How to configure SSL / HTTPS on Spring?) 在我的 Spring Boot 服务器上设置了 SSL,方法如下 their guide:
- 使用
keytool -genkey -alias <alias> -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650创建了一个新的密钥库和密钥 -
将这些行放在我的 application.properties 文件中:
server.port: 8443 server.ssl.key-store: classpath:keystore.p12 server.ssl.key-store-password: <keystore password> server.ssl.key-password = <key password> server.ssl.keyStoreType: PKCS12 server.ssl.keyAlias: <alias>
像魅力一样工作。但是,当我通过运行keytool -genseckey -keystore keystore.jck -storetype JCEKS -storepass <store pass> -keyalg AES -keysize 256 -alias <alias> -keypass <key pass> 生成 AES 256 密钥并将 .properties 文件更改为新的密钥库/密钥值时,对服务器的每个请求都会生成0 EMPTY RESPONSE。我应该遵循哪些步骤才能成功配置它?
【问题讨论】:
-
你遇到了什么错误(如果有的话)?
-
刚刚编辑了我的问题。对不起!应用程序本身不会抛出异常,但每个请求都会导致
0 EMPTY RESPONSE。 -
您能否编辑您的问题以描述您所采取的步骤,而不仅仅是指向指南?我们无法知道您是否真的正确地遵循了指南。
-
@Kenster 抱歉,我刚刚更新了它。我认为我正确地遵循了指南,因为它可以工作,而不是使用我需要的那种密码:/