Re: [PR] improve security of TLS handling in MimeMailers [ ant]

bodewig (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.ant.devel
Message-ID <PR_kwDOATT2FM6YZbmg-642c4dc2-45c5-47df-859f-6465245cf6fd@gitbox.apache.org>
bodewig commented on code in PR #219:
URL: https://github.com/apache/ant/pull/219#discussion_r2134757445


##########
src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java:
##########
@@ -150,6 +154,29 @@ public void setEnableStartTLS(boolean b) {
         this.starttls = b;
     }
 
+    /**
+     * Set whether to require authentication to switch to a TLS
+     * connection via STARTTLS.
+     *
+     * @param b boolean; if true STARTTLS will be supported and required.
+     * @since Ant 1.10.16
+     */
+    public void setRequireStartTLS(boolean b) {
+        this.requireStarttls = b;
+        if (b) {
+            setEnableStartTLS(b);

Review Comment:
   Yes, this is tricky, you are correct. In my brain "require" somehow implies "enable", so in that sense the opposite direction would also be logical.
   
   To be honest I don't really know how similar cases are handled right now - and it may even not be consistent.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.