Force TLS> 1.0 on the local AppEngine development server in Java

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

+5
source share
2 answers

My local application development server started using TLS 1.2 after installing JDK 8 (before I used JDK 7). JDK 8 uses TLS 1.2 by default .

+1
source

Adding to the answer above, since TLS 1.1 and 1.2 are disabled by default on JDK 7, if you do not want to use JDK 8, you can also try changing 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 " $@ " 

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 %* 
+1
source

Source: https://habr.com/ru/post/1244688/


All Articles