由于遗留原因,我必须将 TLS 1.0 与 Jenkins 一起使用。我刚刚下载并安装了设置。
如何配置 Jenkins 以使用 TLS 1.0 而不是默认的 TLS 1.2?
在我的 Jenkins.xml 中我有这个
<executable>%BASE%\jre\bin\java</executable>
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dhttps.protocols=TLSv1 -Dmail.smtp.starttls.enable=true -jar "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments>
这里有两个问题:
1) 这是正确的方法吗?
2) 如何验证正在使用哪个 TLS?
最佳答案
-Dhttps.protocols=TLSv1
的效果不确定,它可能取决于 JSSE Reference Guide 中所述的 Java 实现和版本。 :
This property is currently used by the JSSE implementation, but it is not guaranteed to be examined and used by other implementations.
如果您的 Java 足够新,同一指南会建议使用 -Djdk.tls.client.protocols=TLSv1
。
要检查,您可以添加另一个属性以查看实际情况 (-Djavax.net.debug=all
),或者进行网络捕获并查看 ClientHello。
关于java - Jenkins 2.121.1 使用 TLS 1.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51317455/