Skip to content

Commit aa5f8c8

Browse files
committed
fixed documentation
1 parent 191351d commit aa5f8c8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/java/org/simplejavamail/mailer/MailerGenericBuilder.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ public T withTransportModeLoggingOnly(@Nonnull final Boolean transportModeLoggin
320320
}
321321

322322
/**
323-
* Configures the new session to only accept server certificates issued to one of the provided hostnames, <strong>and disables certificate issuer
324-
* validation.</strong>
323+
* Configures the new session to only accept server certificates issued to one of the provided hostnames. Note that verifying server identity
324+
* can be turned on and off with {@link #verifyingServerIdentity(Boolean)}.
325325
* <p>
326326
* Passing an empty list resets the current session's trust behavior to the default, and is equivalent to never calling this method in the first
327327
* place.
@@ -334,6 +334,7 @@ public T withTransportModeLoggingOnly(@Nonnull final Boolean transportModeLoggin
334334
*
335335
* @see <a href="https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html#mail.smtp.ssl.trust"><code>mail.smtp.ssl.trust</code></a>
336336
* @see #trustingAllHosts(Boolean)
337+
* @see <a href="https://www.oracle.com/technetwork/java/sslnotes-150073.txt">Notes for use of SSL with JavaMail</a>
337338
*/
338339
public T trustingSSLHosts(String... sslHostsToTrust) {
339340
this.sslHostsToTrust = Arrays.asList(sslHostsToTrust);
@@ -343,11 +344,12 @@ public T trustingSSLHosts(String... sslHostsToTrust) {
343344
/**
344345
* Configures the current session to trust all hosts. Defaults to true, but this allows you to white list <em>only</em> certain hosts.
345346
* <p>
346-
* Note that this is <em>not</em> the same as server identity verification, which is an SSL feature enabled through {@link #verifyingServerIdentity(Boolean)}.
347+
* Note that this is <em>not</em> the same as server identity verification, which is enabled through {@link #verifyingServerIdentity(Boolean)}.
347348
* It would be prudent to have at least one of these features turned on, lest you be vulnerable to man-in-the-middle attacks.
348349
*
349350
* @see <a href="https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html#mail.smtp.ssl.trust">mail.smtp.ssl.trust</a>
350351
* @see #trustingSSLHosts(String...)
352+
* @see <a href="https://www.oracle.com/technetwork/java/sslnotes-150073.txt">Notes for use of SSL with JavaMail</a>
351353
*/
352354
public T trustingAllHosts(@Nonnull final Boolean trustAllHosts) {
353355
this.trustAllSSLHost = trustAllHosts;
@@ -357,12 +359,13 @@ public T trustingAllHosts(@Nonnull final Boolean trustAllHosts) {
357359
/**
358360
* Configures the current session to not verify the server's identity on an SSL connection. Defaults to true.
359361
* <p>
360-
* Note that this is <em>not</em> the same as {@link #trustingAllHosts(Boolean)} or {@link #trustingSSLHosts(String...)}, which are not related to SSL connections.
362+
* Note that this is <em>not</em> the same as {@link #trustingAllHosts(Boolean)} or {@link #trustingSSLHosts(String...)}.<br/>
361363
* It would be prudent to have at least one of these features turned on, lest you be vulnerable to man-in-the-middle attacks.
362364
*
363365
* @see <a href="https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html#mail.smtp.ssl.checkserveridentity">mail.smtp.ssl.checkserveridentity</a>
364366
* @see #trustingAllHosts(Boolean)
365367
* @see #trustingSSLHosts(String...)
368+
* @see <a href="https://www.oracle.com/technetwork/java/sslnotes-150073.txt">Notes for use of SSL with JavaMail</a>
366369
*/
367370
public T verifyingServerIdentity(@Nonnull final Boolean verifyingServerIdentity) {
368371
this.verifyingServerIdentity = verifyingServerIdentity;

0 commit comments

Comments
 (0)