<div dir="ltr">i tried to execute ssl program (�<a href="http://www.rabbitmq.com/ssl.html">http://www.rabbitmq.com/ssl.html</a>) connecting without validating certificate<div><br></div><div><div>public class SslCertificate<br>
</div><div>{</div><div>� � public static void main(String[] args) throws Exception</div><div>� � {</div><div><br></div><div>� � � � ConnectionFactory factory = new ConnectionFactory();</div><div>� � � � factory.setHost("localhost");</div>
<div>� � � � factory.setPort(5671);</div><div><br></div><div>� � � � factory.useSslProtocol();</div><div>� � � � // Tells the library to setup the default Key and Trust managers for you</div><div>� � � � // which do not do any form of remote server trust verification</div>
<div><br></div><div>� � � � Connection conn = factory.newConnection();</div><div>� � � � Channel channel = conn.createChannel();</div><div><br></div><div>� � � � //non-durable, exclusive, auto-delete queue</div><div>� � � � channel.queueDeclare("rabbitmq-java-test", false, true, true, null);</div>
<div>� � � � channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());</div><div><br></div><div><br></div><div>� � � � GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);</div>
<div>� � � � if(chResponse == null) {</div><div>� � � � � � System.out.println("No message retrieved");</div><div>� � � � } else {</div><div>� � � � � � byte[] body = chResponse.getBody();</div><div>� � � � � � System.out.println("Recieved: " + new String(body));</div>
<div>� � � � }</div><div><br></div><div><br></div><div>� � � � channel.close();</div><div>� � � � conn.close();</div><div>� � }</div><div>}</div></div><div><br></div><div><br></div><div><b>Getting error</b></div><div><br>
</div><div><div>Exception in thread "main" javax.net.ssl.SSLException: Received fatal alert: internal_error</div><div><span class="" style="white-space:pre">        </span>at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)</div>
<div><span class="" style="white-space:pre">        </span>at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><b>logs</b></div><div><br></div><div>
<div>=ERROR REPORT==== 11-Sep-2013::22:15:52 ===</div><div>SSL: hello: ssl_handshake.erl:265:Fatal error: internal error</div><div><br></div><div>=ERROR REPORT==== 11-Sep-2013::22:15:57 ===</div><div>error on AMQP connection <0.8954.5>: {ssl_upgrade_error,"internal error"} (unknown POSIX error)</div>
</div><div><br></div><div><br></div></div>