Hi guys,
We are trying to setup the com.rabbitmq.client.ConnectionFactory with
private val factory = new ConnectionFactory()
factory.useSslProtocol(MY_SSLContext_WithMyCertificate)
factory.setUri("amqps://...")
(Scala code, but goes the same in Java)
but the ConnectionFactory#setUri resets the context by calling useSslProtocol(); that defaults the trust mgr to TrustEverythingTrustManager.
That would produce the warn message:
WARN |com.rabbitmq.client.TrustEverythingTrustManager.(TrustEverythingTrustManager.java:31)|main|This trust manager trusts every certificate, effectively disabling peer verification. This is convenient for local development but prone to man-in-the-middle attacks. Please see http://www.rabbitmq.com/ssl.html#validating-cerficates to learn more about peer certificate validation.
I could setup my SSLContext after the #setUri invocation but the setUri will still warn like above.
Regards,
Mihai Sarto