<i id='1f5mT'><tr id='1f5mT'><dt id='1f5mT'><q id='1f5mT'><span id='1f5mT'><b id='1f5mT'><form id='1f5mT'><ins id='1f5mT'></ins><ul id='1f5mT'></ul><sub id='1f5mT'></sub></form><legend id='1f5mT'></legend><bdo id='1f5mT'><pre id='1f5mT'><center id='1f5mT'></center></pre></bdo></b><th id='1f5mT'></th></span></q></dt></tr></i><div id='1f5mT'><tfoot id='1f5mT'></tfoot><dl id='1f5mT'><fieldset id='1f5mT'></fieldset></dl></div>

        <bdo id='1f5mT'></bdo><ul id='1f5mT'></ul>

      <small id='1f5mT'></small><noframes id='1f5mT'>

    1. <legend id='1f5mT'><style id='1f5mT'><dir id='1f5mT'><q id='1f5mT'></q></dir></style></legend>
    2. <tfoot id='1f5mT'></tfoot>
    3. 如何强制 JavaMailSenderImpl 使用 TLS1.2?

      How to force JavaMailSenderImpl to use TLS1.2?(如何强制 JavaMailSenderImpl 使用 TLS1.2?)
        <legend id='VhuMe'><style id='VhuMe'><dir id='VhuMe'><q id='VhuMe'></q></dir></style></legend>

            <bdo id='VhuMe'></bdo><ul id='VhuMe'></ul>
            <i id='VhuMe'><tr id='VhuMe'><dt id='VhuMe'><q id='VhuMe'><span id='VhuMe'><b id='VhuMe'><form id='VhuMe'><ins id='VhuMe'></ins><ul id='VhuMe'></ul><sub id='VhuMe'></sub></form><legend id='VhuMe'></legend><bdo id='VhuMe'><pre id='VhuMe'><center id='VhuMe'></center></pre></bdo></b><th id='VhuMe'></th></span></q></dt></tr></i><div id='VhuMe'><tfoot id='VhuMe'></tfoot><dl id='VhuMe'><fieldset id='VhuMe'></fieldset></dl></div>
                <tbody id='VhuMe'></tbody>
            1. <tfoot id='VhuMe'></tfoot>

              <small id='VhuMe'></small><noframes id='VhuMe'>

              • 本文介绍了如何强制 JavaMailSenderImpl 使用 TLS1.2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                有一个在 Tomcat 上运行的 JDK7 应用程序,它确实具有以下环境设置:

                Have a JDK7 app running on Tomcat and it does have the following env settings:

                -Dhttps.protocols=TLSv1.1,TLSv1.2 
                

                上述设置确保我们在通过 HTTPS 连接时不使用 TLS 1.0,同时进行 API 调用等.

                The above setting ensures that we don't use TLS 1.0 when connecting over HTTPS while making API calls etc.

                我们还使用 org.springframework.mail.javamail.JavaMailSenderImpl 类来发送外发 SMTP 电子邮件,并使用这些道具:

                We also use the org.springframework.mail.javamail.JavaMailSenderImpl class to send outgoing SMTP email, and use these props:

                 mail.smtp.auth=false;mail.smtp.socketFactory.port=2525;mail.smtp.socketFactory.fallback=true;mail.smtp.starttls.enable=true
                

                问题在于升级到 TLS1.2 时与 SMTP 电子邮件服务器的连接失败.

                The problem is that the connection to the SMTP email server is failing when it's upgraded to TLS1.2.

                javax.net.ssl.SSLHandshakeException:远程主机关闭连接握手时

                javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

                是否存在强制使用 TLS1.2 协议的设置或代码更改?

                我做了一些搜索,看起来这些环境设置仅适用于小程序和 Web 客户端,不适用于服务器端应用程序

                I did some searching and it looks like these env settings are only for applet and web clients, not for server side apps

                -Ddeployment.security.SSLv2Hello=false -Ddeployment.security.SSLv3=false -Ddeployment.security.TLSv1=false
                

                推荐答案

                这是下一个要找的人的解决方法:

                This is the fix for the next guy looking:

                mail.smtp.starttls.enable=true;
                mail.smtp.ssl.protocols=TLSv1.2;
                

                这篇关于如何强制 JavaMailSenderImpl 使用 TLS1.2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                <legend id='TM48l'><style id='TM48l'><dir id='TM48l'><q id='TM48l'></q></dir></style></legend>
                  <i id='TM48l'><tr id='TM48l'><dt id='TM48l'><q id='TM48l'><span id='TM48l'><b id='TM48l'><form id='TM48l'><ins id='TM48l'></ins><ul id='TM48l'></ul><sub id='TM48l'></sub></form><legend id='TM48l'></legend><bdo id='TM48l'><pre id='TM48l'><center id='TM48l'></center></pre></bdo></b><th id='TM48l'></th></span></q></dt></tr></i><div id='TM48l'><tfoot id='TM48l'></tfoot><dl id='TM48l'><fieldset id='TM48l'></fieldset></dl></div>

                    <tbody id='TM48l'></tbody>
                • <tfoot id='TM48l'></tfoot>

                      <small id='TM48l'></small><noframes id='TM48l'>

                        <bdo id='TM48l'></bdo><ul id='TM48l'></ul>