强制TLS> 1.0在Java中的AppEngine本地开发服务器上 [英] Force TLS > 1.0 on AppEngine local development server in Java

查看:130
本文介绍了强制TLS> 1.0在Java中的AppEngine本地开发服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要至少使用TLS 1.1连接到外部服务,该服务在使用Java SDK v。1.9.32的本地开发服务器上不起作用。有没有办法强制本地开发服务器使用特定版本的TLS?还是仅仅在Java SDK中不支持?

we need to connect to an external service using at least TLS 1.1, which doesn't work on the local development server using the Java SDK v. 1.9.32. Is there a way to force the local dev server to use a specific version of TLS? Or is it just not supported in the Java SDK?

推荐答案

除了上面的答案,由于TLS 1.1和1.2被禁用如果您不想使用JDK 8,则还可以尝试使用以下标志修改dev_appserver.sh的最后一行:

Adding to the above answer, since TLS 1.1 and 1.2 are disabled by default on JDK 7, if you don't want to use JDK 8 you can also try modifying the last line of dev_appserver.sh with the following flags:

exec "${RUN_JAVA}" "${SCRIPT_NAME}" \
    -Ddeployment.security.TLSv1.1=true -Ddeployment.security.TLSv1.2=true -ea -cp "${JAR_FILE}" \
    com.google.appengine.tools.KickStart \
    com.google.appengine.tools.development.DevAppServerMain "$@"

或Windows上的dev_appserver.cmd:

Or dev_appserver.cmd on Windows:

java -Ddeployment.security.TLSv1.1=true -Ddeployment.security.TLSv1.2=true -cp "%~dp0\..\lib\appengine-tools-api.jar" ^
    com.google.appengine.tools.KickStart ^
    com.google.appengine.tools.development.DevAppServerMain %*

这篇关于强制TLS> 1.0在Java中的AppEngine本地开发服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆