spring-boot - keystore password incorrect in Spring boot SSL
问题描述
I generate my keystore as follows:
keytool -genkeypair -alias applocaldata -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore applocaldata.p12 -validity 3650
my spring boot config looks as follows:
server:
address: apps.companyname.local
port: 8443
ssl:
key-store-type: JKS
key-store: classpath:applocaldata.p12
key-store-provider: SUN
key-password: password
key-alias: applocaldata
enabled: true
trust-store: classpath:applocaldata.p12
trust-store-password: password
trust-store-provider: SUN
I keep getting the error at the start:
[...]
Caused by: java.lang.IllegalArgumentException: keystore password was incorrect
[...]
I can use the same password with:
keytool -list -v -keystore applocaldata.p12
and I can see the keystore data. What might I be doing wrong in Spring boot? Exactly the same happens when I generate a jks keystore.
解决方案
推荐阅读
- android - 无法删除 Android 下载文件夹中的文件夹
- mysql - 如何从所有 VIEW 中更新所有 DEFINER
- python - 子集和问题的实现给出了错误的答案
- python - 每个需要验证的用户输入都需要一个while循环吗?
- python - 将 Python 函数应用于输出向量的所有元素(从 R 转换)
- python - 如何将文件包含到python
- r - R循环通过read.delim 404文件未找到
- function - 将变量传递给某个参数函数并忽略另一个
- sql - 如何使用 SQL 在表中查找/选择连续记录(至少出现两次)
- jquery - 使用 jquery 和 ajax 更改 videojs src