File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/main/java/com/rabbitmq/client Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1616
1717package com .rabbitmq .client ;
1818
19+ import org .slf4j .LoggerFactory ;
20+
1921import java .security .cert .X509Certificate ;
2022
2123import javax .net .ssl .X509TrustManager ;
2527 * Trusts every single certificate presented to it.
2628 */
2729public class NullTrustManager implements X509TrustManager {
30+
31+ public NullTrustManager () {
32+ LoggerFactory .getLogger (NullTrustManager .class ).warn (
33+ "This trust manager trusts every certificate, making peer hostname verification disabled. " +
34+ "This is convenient for local development but prone to man-in-the-middle attacks. " +
35+ "Please see http://www.rabbitmq.com/ssl.html#validating-cerficates to validate server certificates."
36+ );
37+ }
38+
2839 /**
2940 * Doesn't even bother looking at its arguments, simply returns,
3041 * which makes the check succeed.
You can’t perform that action at this time.
0 commit comments