<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(&quot;localhost&quot;);</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(&quot;rabbitmq-java-test&quot;, false, true, true, null);</div>
<div>� � � � channel.basicPublish(&quot;&quot;, &quot;rabbitmq-java-test&quot;, null, &quot;Hello, World&quot;.getBytes());</div><div><br></div><div><br></div><div>� � � � GetResponse chResponse = channel.basicGet(&quot;rabbitmq-java-test&quot;, false);</div>
<div>� � � � if(chResponse == null) {</div><div>� � � � � � System.out.println(&quot;No message retrieved&quot;);</div><div>� � � � } else {</div><div>� � � � � � byte[] body = chResponse.getBody();</div><div>� � � � � � System.out.println(&quot;Recieved: &quot; + 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 &quot;main&quot; 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 &lt;0.8954.5&gt;: {ssl_upgrade_error,&quot;internal error&quot;} (unknown POSIX error)</div>
</div><div><br></div><div><br></div></div>