2017-05-19 1 views
0

Je cours un AppEngine sur Java 1.7, en utilisant le framework Spring. Je dois faire la demande au Stripe API, qui exige TLSv1.2 en faisant une demande. Cela fonctionne correctement lors du déploiement de l'application dans l'environnement Google, mais il refuse d'utiliser ce protocole lors de l'exécution locale du serveur. Il donne l'erreur suivante:Problème de demandes de devserver de Google App Engine local avec TLSv1.2

Stripe no longer supports API requests made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. You can learn more about this at https://stripe.com/blog/upgrading-tls .

J'utilise IntelliJ, la version AppEngine SDK 09/01/42 en combinaison avec Maven. J'ai essayé d'ajouter des options de construction à plusieurs endroits (-Ddeployment.security.TLSv1.2 = true -Dhttps.protocols = TLSv1.2), dans la configuration IntelliJ Run/Debug, dans les drapeaux JVM XML, dans dev_appserver.py fichier, mais aucun d'entre eux a travaillé. Comment puis-je activer TLSv1.2 dans mon serveur de développement local Java 7 et parler à l'API Stripe?

Répondre

0

Depuis l'entrée de blog référencé dans le journal d'erreur:

You can proactively check whether your Stripe integration is ready, and how to upgrade, by following the steps on our TLS deprecation page .

Et à partir de ce lien qui pointe vers How do I upgrade my Stripe integration from TLS 1.0 to TLS 1.2? vous pouvez trouver the Java-specific instructions:

You can determine whether your Java integration is affected from the Java version you are running, and the stripe-java version you are using.

You can find your Java version by running java -version at the command line, and your stripe-java version by looking for the version number in your jar file’s name, for example stripe-java-1.40.0.jar or by finding the version of the Stripe dependency in your POM file.

If you are running Java

  • version 1.6, you will need to upgrade to at least Java version 1.7, and stripe-java version 1.36.0.
  • version 1.7, and you have a stripe-java version earlier than 1.36.0, you will need to upgrade to at least stripe-java version 1.36.0.
  • version 1.8, you will not need to change anything.

You can upgrade your stripe-java version by downloading a new jar , or by upgrading the version number in your POM, and rebuilding your project.

You can upgrade your Java version by downloading a new copy , or installing a newer version of OpenJDK.