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 16
16
17
17
package com .rabbitmq .client ;
18
18
19
+ import org .slf4j .LoggerFactory ;
20
+
19
21
import java .security .cert .X509Certificate ;
20
22
21
23
import javax .net .ssl .X509TrustManager ;
25
27
* Trusts every single certificate presented to it.
26
28
*/
27
29
public 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
+
28
39
/**
29
40
* Doesn't even bother looking at its arguments, simply returns,
30
41
* which makes the check succeed.
You can’t perform that action at this time.
0 commit comments