Closed
Description
Backdrop : we have been using the amqp-rabbit connectionfactory. we use self signed certificate on server. we don't do the client-server authentication using TLS.
If the truststore and keystore is null and Usessl flag is set to true; the client accepts connections from any server.
below code gets invoked in the above scenario
useSslProtocol(protocol, new NullTrustManager());
and in NullTrustManager as the doc suggest we do nothing.
/* Doesn't even bother looking at its arguments, simply returns,
/* which makes the check succeed.
*/
this is a grave security flaw (I feel) . This opens up possibility of man-in-middle attack.
If truststore is null we should delegate to Java's default implementation; under $JAVA_HOME/jre/lib/security/caccerts
I had updated code in my fork to reflect whatever I said.
do you agree or is there something else which i may have overlooked?