如何在Java Spring Boot Application中实现TLS 1.3?

时间:2019-06-06 18:55:07

标签: java spring spring-boot tls1.3

我想在我的Spring Boot应用程序中实现TLS 1.3。

https://blog.gypsyengineer.com/en/security/an-example-of-tls-13-client-and-server-on-java.html

在此博客中,我看到TLS 1.3只能与Java 11一起使用。是真的吗?

请逐步实施该程序。

1 个答案:

答案 0 :(得分:1)

如果您只想在Spring Boot应用程序中使用TLSv1.3,则可以在application.properties文件(或任何处于活动配置文件中的properties / yml文件)中进行配置。

server.ssl.enabled-protocols=TLSv1.3

server.ssl.enabled-protocols属性具有一个列表,因此,如果要使用TLSv1.2和TLSv1.3,也可以这样做:

server.ssl.enabled-protocols=TLSv1.2,TLSv1.3

文档中有关在Spring Boot can be found here中配置SSL / TLS的综合指南。文档中的所有SSL / TLS属性can be found in this appendix

要回答您的问题,是的,TLSv1.3是在Java 11中提供的。