我尝试使用以下配置在我的spring boot mvc应用程序上启用https协议:
server.port=8443
server.ssl.key-store-type=PKCS12
server.ssl.key-store=/var/tomcat9/ssl/keystore.p12
server.ssl.key-store-password=password
server.ssl.key-alias=tomcat
server.ssl.key-store-provider=SUN
server.ssl.enabled=true
keytool description命令返回:
keytool -list -v -keystore keystore.p12
Enter keystore password:
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: tomcat
Creation date: Dec 6, 2019
Entry type: PrivateKeyEntry
Certificate chain length: 2
Certificate[1]:
Owner: CN=domain.com
Issuer: CN=Let's Encrypt Authority X3, O=Let's Encrypt, C=US
Serial number: 3d9a23778a3ee70d13bf6c134d137f64f05
Valid from: Fri Dec 06 22:32:46 CET 2019 until: Thu Mar 05 22:32:46 CET 2020
Certificate fingerprints:
MD5: 4D:17:A0:DA:25:34:35:36:37:2E:CA:EF:21:DA:69:19
SHA1: 8A:FC:8C:E7:3E:D2:AE:C0:02:F8:CD:19:68:9E:1A:77:50:CC:FB:24
SHA256: 88:78:D9:D8:FD:D0:24:82:5C:3D:8C:56:46:70:84:96:F0:9E:F3:23:26:1C:F7:46:56:00:15:C7:5A:52:55:B3
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
每当我在导航器中键入https://example.com:8443/时,我都会自动重定向到拒绝连接。
https://localhost:8443也可以使用自签名证书。
请你帮忙吗?